| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code of Conduct.
Sorry, something went wrong.
|
Are the built updated pages. I am 👍🏻 to merge as is, but I think it would look a bit better with a thinner lw on the surface? |
Sorry, something went wrong.
|
Thank you for finding and fixing this very old fallout from the mpl 1->2 style change! |
Sorry, something went wrong.
|
@tacaswell Thanks for the feedback.
Agreed, those plots are ugly. However, this is also very strange: It is not how it looks like on my machine locally. How should I fix this? |
Sorry, something went wrong.
|
Do you have any custom rcparams set? The simplest solution is to pass lw to the calls, but we should understand why you get something different locally. |
Sorry, something went wrong.
|
I did not check whether it's related, but https://matplotlib.org/devdocs/gallery/mplot3d/wire3d.html#sphx-glr-gallery-mplot3d-wire3d-py has a similar linewidth. |
Sorry, something went wrong.
|
It would indeed look better with thinner lines, but then this seems to be the default linewidth considering the width of the other plotted lines in that figure (the ones on the panes)? |
Sorry, something went wrong.
|
The Poly3DCollection uses patch.linewidth: 1.0 by default. For comparison grid.linewidth: 0.8. So yes, the lines are thicker. I suppose the lines appear even more prominent because of the black color. I suggest to make the lines thinner (0.8 or even 0.5) and maybe go from black to a dark grey. We already a lot of customization on the plot_surface call. I'm therefore not worried adding more to make the plot look nicer. |
Sorry, something went wrong.
|
I am someone with serious color vision deficiency, so I am kindly asking you to vote. Which one of these looks the best? Each with lw=0.5 edgecolor='black' edgecolor='cm.coolwarm(0)' edgecolor='0.35' I find the one in the middle the nicest, but I have serious trouble with colors. So, please vote. |
Sorry, something went wrong.
I agree. There's some consistency in having darker blue lines on a light-blue surface. Could you also try tab:blue as a color? I think the faces are tab:blue but light because of the transparency. |
Sorry, something went wrong.
|
Thank you for your prompt feedback. Here is the one with tab:blue: I find the one with edgecolor='cm.coolwarm(0)' a bit more vivid (nicer). |
Sorry, something went wrong.
|
Thanks!
Agreed. Let's use that one. |
Sorry, something went wrong.
|
Done. All green. I do not know how to link the built updated pages here, sorry. They look really nice locally on my machine. |
Sorry, something went wrong.
| from mpl_toolkits.mplot3d import axes3d | ||
| import matplotlib.pyplot as plt | ||
| from matplotlib import cm | ||
| from matplotlib.cm import coolwarm as cmap |
There was a problem hiding this comment.
It's recommended nowadays to use the colormap registry instead of importing from matplotlib.cm:
cmap = plt.colormaps['coolwarm']
You could go even one step further and use the string contour(..., cmap='coolwarm'). Usually, that's the simplest way if you don't need the colormap object itself. Here however, you have the cmap(0) call. I'm tempted to resolve this to an explicit '#3b4cc0' and get rid of the colormap object completely, which IMHO makes the example simpler.
But I'll let you choose whether to go all-string or retrieve cmap from plt.colormaps.
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, that cmap(0) is bugging me too. I was considering '#3b4cc0' too, but it is too cryptic. Is there some named blue in the neighborhood?
https://matplotlib.org/stable/gallery/color/named_colors.html#css-colors
Since I am green blind, I would like to kindly ask you to please help me out here: If you agree, please suggest a named blue instead of '#3b4cc0'. Thanks!
Sorry, something went wrong.
Sorry, something went wrong.
| from mpl_toolkits.mplot3d import axes3d | ||
| import matplotlib.pyplot as plt | ||
| from matplotlib import cm | ||
| from matplotlib.cm import coolwarm as cmap |
There was a problem hiding this comment.
As above.
Sorry, something went wrong.
FYI: There's a "View the built docs" entry in the CI checks section below: |
Sorry, something went wrong.
|
Thank you very much for your help. The revised code/plots are here: I went with royalblue. In my opinion, the mediumblue looks too harsh on the filled version of the plot. What should I do next? |
Sorry, something went wrong.
|
Thank you @baharev and congratulations on your first merged Matplotlib PR 🎉 I hope that we will hear from you again! You maybe interested in One of my regrets from the 2.0 default style changes is that while we put a whole lot of effort into the color map and making sure it was OK for color vision deficiencies, we failed to do the same to the default color cycle. |
Sorry, something went wrong.
|
And I would like to thank you all for your help, patience and constructive feedback. 🙂 I will watch that video this evening, thanks for the info. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
See #23895:
Closes #23895.
PR Checklist
Tests and Styling
Documentation