-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seamless Subplotting #20
Comments
Did you try passing |
I did try it. Can you possibly give a sample syntax. My other subplots go something like this: ax = plt.subplot(514)
ax.set_ylabel('Cloud Cover (fraction)')
ax.spines["top"].set_visible(False)
ax.spines["bottom"].set_visible(True)
ax.spines["right"].set_visible(False)
ax.spines["left"].set_visible(True)
ax.get_xaxis().tick_bottom()
ax.get_yaxis().tick_left()
ax.xaxis.set_major_locator(matplotlib.dates.MonthLocator(bymonth=None, bymonthday=01, interval=4, tz=None))
ax.xaxis.set_major_formatter(matplotlib.dates.DateFormatter('%b %Y'))
line = plt.plot(Date, df.CC, lw=1.5, color='black')
line = plt.plot(Date, movingaverage(df.CC,24), lw=1.0, color='red') So I need a setup to plot it in position 515. |
I faced a similar issue Pinging original author @lionelr |
It will be great if some Matplotlib experts such as @tacaswell @JanSchulz or @mdboom (or some others) could help on this. |
@adityasinghwa can you post a minimal example which goes wrong? |
You have to manually set your WindRoseAxes position on the figure, like you have to do with Axes and PolarAxes, because plt.subplot is just a helper function for that. You can achieve that like this from windrose import WindroseAxes
from matplotlib import pyplot as plt
import matplotlib.cm as cm
import numpy as np
ws = np.random.random(500) * 6
wd = np.random.random(500) * 360
ax=plt.subplot(221) # and set whatever you want in this axes
fig=gcf()
rect=[0.6,0.6,0.3,0.3] # have to be calculated with the others axes
wa=WindroseAxes(fig, rect)
fig.add_axes(wa)
wa.bar(wd, ws, normed=True, opening=0.8, edgecolor='white') |
Hi folks, A subplots example is available at https://github.com/scls19fr/windrose/blob/master/samples/example_subplots.py See screenshot This figure is composed of 12 windrose plots from Poitiers (year 2014, monthly) It can probably be improved to display month (name or number) as subplots title We should also provide a better API to make automatically this kind of plot. Kind regards |
Made this one with matlab where Will give manually trying to fit the axes a go. The problem is then they have to be manually setup for all the plots. |
@adityasinghwa can you share a snippet of your code I am trying to do subplots with other charts like you too but I can't work it out |
Maybe this https://github.com/scls19fr/windrose/issues/38 could help to have easier subplotting. |
we can do
an other example can be found https://github.com/scls19fr/windrose/blob/master/samples/example_subplots.py#L62 |
Hi! I was trying to use the module to plot a bunch of other weather parameters. The module can only be used for standalone plots. I cannot subplot it within my existing plot setup. I have tried some of the work arounds given but was not successful.
The text was updated successfully, but these errors were encountered: