Comments (5)
You're right. The thing is, in my implementation, each one of the density subplots has its own axes, with their own xlim and ylim. Then there's an outer axis pair, behind all the other ones, that is used e.g. for xticks and xlabels. The xlim values of all the subplots are the same by construction, but there is no hard constraint that makes them so.
With matplotlib.pyplot.xlim(xmin, xmax)
you're changing the lims of the current X axis -- whatever current means in this case. I guess it is the last one, i.e., the "container" axis, so you're not changing the xlims of the single subplots. To get that effect, you should loop over all the axes returned by joyplot (in your case, the first 4 are your density subplots, + the last one is the "container" one) and set the xlim of each of them.
from joypy.
Hi Tobias, you should apply set_xlabel
to the last axes returned by the function. Something like this:
fig, axes = joypy.joyplot(data)
axes[-1].set_xlabel("My x label")
from joypy.
OK, thanks.
from joypy.
Hallo, this is very nice tool and I would like to use it in my Phd thesis.
However, I have some issue to set the xlabel. I see in the example above, this seems possible?
Can you tell me how to do it the standard method I use with seaborn an matplotlib and pylab in the jupyter notebook is:
xlabel('label of x')
or similar.
but this gives back:
<ipython-input-316-4a720c777783> in <module>()
5 xlabel('some x labe')
TypeError: 'str' object is not callable
If I remove the xlabel, the plot works perfectly fine and looks like this.
05_all_grainsize_distribution_Joyplot.pdf
Thank you in advance, for this tool and all the best,
Tobias
ps. plt.xlabel('label of x')
doesn't work either.
from joypy.
Hallo sbebo,
Ah, now I see, my fault.
Thank you very much for the fast help and the great work!
Best regards,
Tobias
from joypy.
Related Issues (20)
- pandas.plotting._tools not supported in pandas 0.25.0 HOT 2
- It should be possible to sort the plots HOT 1
- Documentation + examples
- ENH: Add logscale option HOT 2
- import fails with latest version of pandas HOT 2
- Not enough colors in matplotlib default color cycle to draw all subplots
- Aggregate data in a specific column HOT 3
- Unexpected behaviour of figsize and overlap HOT 6
- Incorrect plotting of standard gaussian? HOT 1
- Typo in "num_axes" variable? HOT 1
- Update Iris Example in Readme HOT 1
- "By" Column Is Not Properly Removed HOT 1
- Rotate ridges 90 degrees? HOT 1
- How to align all y_series?
- Joypy and gridspec HOT 2
- Is it possible to inverse the plot?
- Is it possible to change joyplot's zorder? HOT 1
- Github Tags/Releases? HOT 2
- Passing axis parameter into new joyplot function call?
- How you can set different colors in Hist mode for each group? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from joypy.