I am trying to plot wind roses in subplots by using the module windrose in python
https://pypi.python.org/pypi/windrose/
Apart from some examples there is not too much documentation so I do not know how to use it to plot different subplots of wind roses
My try quite summarized:
import pandas as pd
import matplotlib.pyplot as plt
from windrose import WindroseAxes
import matplotlib.cm as cm
from time import sleep
v=df.speed
d=df.direction
f = Figure(figsize=(16,9), dpi=60)
a = f.add_subplot(131)
ax = WindroseAxes.from_ax()
a.set_axes(ax)
ax.bar(d,v, normed= True,opening=0.8, edgecolor='white')
ax.set_legend()
then b = f.add_subplot(132)
....
and so on
My second question is,
Once I generate the plot I would like to introduce a pause with time.sleep() or something similar
I tried with a simple example in which:
- I plot something
- then export it to png format with f.savefig()
- then I introduce sleep(20)
- then the code continues
but although it exports the right png It is not displayed on the screen and the code continues. As it does not raise any error I suppose there is something missing I should add before or after sleep()