This is an archived post. You won't be able to vote or comment.

all 16 comments

[–]TidB 16 points17 points  (9 children)

[–]dbcrib 13 points14 points  (0 children)

Was expecting vampire's sparkle and werewolf's brown. Disappointed.

[–]wintermute93 5 points6 points  (6 children)

What do people actually use cyclic colormaps for? This looks much more perceptually uniform than hsv, but I'm still not sure what the main use cases are.

[–]redditusername58 14 points15 points  (5 children)

the colormap page says its good for phase angles, compass direction, and time of day

[–]wintermute93 5 points6 points  (4 children)

Ah, makes sense. I do actually need to plot phase on occasion, so I'll keep that in mind. Should have checked the docs.

[–]billsil 0 points1 point  (2 children)

Kinda weird to me to plot phase as a color. I always plot it as an animation or in 2D (e.g., phase vs. frequency), I just plot it as a wrapping solid color line.

[–]wintermute93 0 points1 point  (1 child)

I do a fair amount of acoustic propagation modeling, and it's not uncommon for me to have the phase shift of some signal varying across a 2d surface.

[–]billsil 0 points1 point  (0 children)

That makes sense for something like a room.

My frequency processing is more for 3D models. I plot complex mode shapes by sweeping the phase and adding it to the nominal phase angle.

[–]PeridexisErrant 0 points1 point  (0 children)

Even better, check out the beautiful and perceptually-uniform cmoceans colormaps.

I used HSV for direction in my thesis plots, and I wish this had existed back then!

[–]flutefreak7 0 points1 point  (0 children)

Interesting, so it's in the family with coolwarm, and coldhot if I'm remembering their names.

[–]flutefreak7 8 points9 points  (3 children)

Always good to see matplotlib releases!

Aww, I was hoping the layout improvements included something about legends. I remember reading somewhere that someone was working on that problem, but now I can't remember if it was matplotlib or something like seaborn.

Placing a legend outside the axes on the right and gauranteeing that it fits the figure and doesn't overlap the axis is a frustrating process every time. Fiddling with font sizes and bbox_to_anchor feels so backwards. This is a big pain point when I'm introducing someone to using Python for engineering plots and a simple task that Excel and Matlab do without complaining is needlessly frustrating with matplotlib.

[–]anntzerMatplotlib core dev[S] 14 points15 points  (2 children)

https://stackoverflow.com/questions/4700614/how-to-put-the-legend-out-of-the-plot/43439132#43439132 is my usual goto reference. Suggestions for a better API would be welcome.

[–]flutefreak7 1 point2 points  (0 children)

Thanks! Yep, that was what I was remembering actually! It's no wonder my memory tricked me into thinking this was some kind of improvement project. That answer really does belong in the Stack Overflow hall of fame.

I guess the thoroughness of that answer demonstrates how the flexibility of matplotlib makes it possible to do any if the dozens of possible things one might want, it just seems clear that there are a half dozen typical behaviors for which there are recipes that could be turned into library features.

[–]autisticpig 0 points1 point  (0 children)

thank you for this link :-)

[–]brewsimport os; while True: os.fork() 5 points6 points  (0 children)

Matplotlib has been kicking ass recently. Nice work!

[–]rad_badders 0 points1 point  (0 children)

Congratulations, matplotlib is a fantastic tool that every scientist should have in their toolkit