How can I plot a bar chart from a Python Xarray dataset (eg. rain data axis)?
I am already using this code to resize the plot
fig, ax = plt.subplots(figsize=(9, 9)) #redimensionamento do gráfico
dsfanadia.rain.plot(ax=ax)
The easiest way to make a bar chart with xarray is to convert your data into pandas:
fig, ax = plt.subplots(figsize=(9, 9))
series = dsfanadia.to_series()
series.plot.bar(ax=ax)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With