has2k1 / plotnine

A Grammar of Graphics for Python
https://plotnine.org
MIT License
3.99k stars 213 forks source link

break axis #775

Open wangjiawen2013 opened 5 months ago

wangjiawen2013 commented 5 months ago

Hi, How to add axis breaks using plotnine ? image

has2k1 commented 5 months ago

It is not possible at the moment but we could explore having it in the future.

TyberiusPrime commented 5 months ago

Note that it's also not a ggplot2 thing - due to being a somewhat questionable way of visualization. (It's ok for scatter plots, but as your example shows looks weird for lines, and it's not appropriate for bar charts).

See https://stackoverflow.com/questions/7194688/using-ggplot2-can-i-insert-a-break-in-the-axis for some good ideas for alternatives (plotnine doesn't have the zoom capability, but the facet options etc are possible).