joypy icon indicating copy to clipboard operation
joypy copied to clipboard

Color gradient along horizontal axis rather than the vertical axis

Open flehner opened this issue 2 years ago • 5 comments

It seems joypy was used to create this prominent figure copied below: https://ichef.bbci.co.uk/news/1536/cpsprodpb/1216F/production/_132259047_global_temp_delta_1991_2020avg_multiple_ridges_v2-2x-nc.png.webp

In it, the colormap gradient runs along the horizontal axis of each individual filled KDE plot, rather than along the vertical axis which is what happens by default when you pass a colormap into joyplot. How can you achieve this with joypy.joyplot?

image

flehner avatar Jan 10 '24 13:01 flehner

this library uses matplotlib's fill_between, I guess we would have to switch to imshow, or draw an unreasonable amount of fill_between and cycle through a colormap

wonder route BBC took? :)

officialankan avatar Jan 11 '24 19:01 officialankan

I realized since that it's also possible that they used R's ggridges, in which it's easy to implement such horizontal color gradients.

flehner avatar Jan 11 '24 20:01 flehner

In all honesty I don't think they used joypy :-)

Il gio 11 gen 2024, 21:11 Flavio Lehner @.***> ha scritto:

I realized since that it's also possible that they used R's ggridges, in which it's easy to implement such horizontal color gradients.

— Reply to this email directly, view it on GitHub https://github.com/leotac/joypy/issues/70#issuecomment-1887889870, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKAEOUUV6S7C4ZE6R3HLTLYOBBP7AVCNFSM6AAAAABBUZOYISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBXHA4DSOBXGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

leotac avatar Jan 12 '24 09:01 leotac

Is there any updates ? Can we achieve horizontal gradient colors ? Its super important. Thanks!

yangyxt avatar Mar 01 '24 16:03 yangyxt

I admit I did not pursue this further since I found the R solution mentioned above. image

flehner avatar Mar 01 '24 16:03 flehner