You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docstring for contourf states that the origin keyword "is only relevant, if X, Y are not given". The contourf demo passes X, Y and origin for most of its examples.
Suggested improvement
The simplest thing would be to strip out origin where it's not relevant, but it might be nice to show some examples where it does make a difference.
Should I add a new Example which demonstrate with origin attribute so that it can be differentiate between "lower" and "upper" values?
If so I can add this Example:
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(1, 10)
y = x.reshape(-1, 1)
h = x * y
cs = plt.contourf(h, levels=[10, 30, 50],
colors=['#808080', '#A0A0A0', '#C0C0C0'], extend='both', origin="upper")
cs.cmap.set_over('red')
cs.cmap.set_under('blue')
cs.changed()
This Example will be helpful for visualizing the plot when we include origin attribute.
Activity
gautamsagar99 commentedon Aug 26, 2023
Hello,
I'm new to open source contribution, I want to solve this issue. I think no one created a PR for this issue can I start working on it?
Thanks
rcomer commentedon Aug 26, 2023
Thanks @gautamsagar99, please go ahead and see our Contributors’ Guide here:
https://matplotlib.org/devdocs/devel/index.html
gautamsagar99 commentedon Aug 26, 2023
Hi @rcomer,
I found that origin attribute is useless for all the examples which are provided here https://matplotlib.org/devdocs/gallery/images_contours_and_fields/contourf_demo.html
Should I add a new Example which demonstrate with origin attribute so that it can be differentiate between "lower" and "upper" values?
If so I can add this Example:
This Example will be helpful for visualizing the plot when we include origin attribute.