| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| negative_linestyles : None or str, optional | ||
| {'solid', 'dashed', 'dashdot', 'dotted'} |
There was a problem hiding this comment.
| negative_linestyles : None or str, optional | |
| {'solid', 'dashed', 'dashdot', 'dotted'} | |
| negative_linestyles : {*None*, 'solid', 'dashed', 'dashdot', 'dotted'}, \ | |
| optional |
(or where ever the line should break.)
Sorry, something went wrong.
There was a problem hiding this comment.
I went ahead and made this exact change. It matches linestyles formatting... I'm not sure where I saw the formatting I initially had.
Sorry, something went wrong.
There was a problem hiding this comment.
This looks good to me, and useful.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
I made the negative_linestyles for contours toggle-able via kwarg. The only way to toggle this currently is with rcParams.
I am re-opening this issue from a fresh branch. There was some discussion in #23102.
In the attached issue, we had some discussion on whether this is a good idea or not, but I think it is worth considering. We can maintain current functionality and just apply the kwarg if it is defined. This will not break previous functionality. I wrote some tests for this, but I know they can be improved. I'm not completely certain on using baseline_images with parametrized inputs.
Please use this PR and the attached issue to discuss whether this is a good idea or not. I'm happy to take this in a different direction if there are some better ideas!
Closes #23028
Previous
plt.rcParams['contour.negative_linestyle'] = 'solid' fig, ax = plt.subplots() CS = ax.contour(X, Y, Z, 6, colors='k') # Negative contours default to dashed. ax.clabel(CS, fontsize=9, inline=True) ax.set_title('Single color - negative contours solid')With this PR
fig2, ax2 = plt.subplots() CS = ax2.contour(X, Y, Z, 6, colors='k', negative_linestyles='solid') ax2.clabel(CS, fontsize=9, inline=True) ax2.set_title('Single color - negative contours solid')PR Checklist
Tests and Styling
Documentation