`vmax` has no effects without `vmin`
See original GitHub issueDescription
In the old version of proplot, once I set the vmax, the threshold of the plotting figure will change.
But I have to set both vmin and vmax to make it work for the new version.
Steps to reproduce
import proplot as pplt
import numpy as np
# Sample data
state = np.random.RandomState(51423)
x = y = np.array([-10, -5, 0, 5, 10])
data = state.rand(y.size, x.size)
# Figure
fig = pplt.figure(refwidth=2.3, share=False)
axs = fig.subplots()
m = axs.pcolormesh(x, y, data, vmax=1.35)
axs.colorbar([m], loc='r')
Expected behavior:

Actual behavior: [What actually happened]

Proplot version
Paste the results of import matplotlib; print(matplotlib.__version__); import proplot; print(proplot.version)here.
3.3.4
0.8.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
`vmax` has no effects without `vmin` · Issue #276 · proplot-dev ...
Description In the old version of proplot, once I set the vmax, the threshold of the plotting figure will change. But I have...
Read more >vmin, vmax not changing the display range in plt.imshow ...
I'm doing some manipulation with images and need the image to be displayed correctly exactly as it is in the array.
Read more >ImageNormalize — Astropy v5.2
If vmin and/or vmax is not given, they are initialized from the minimum and maximum value, respectively, of the first input processed; i.e.,...
Read more >Using vmin and vmax does not change anything for my plots
I did not change vmin and vmax, to plot another set of data that has a different (LOWER) minimum and maximum.
Read more >vw, vh, vmin, vmax Unit Support - Litmus
Hi there! Has anyone ever tried to use vw, vh, vmin, vmax units in their email design/dev travels? I'm specifically interested in whether...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Looks like I missed your last comment.
This actually isn’t a bug – it’s a result of proplot feeding
vminandvmaxinto an algorithm similar to matplotlib’s_autolevalgorithm used to determine contour levels. The algorithm tries to generate nice levels and in general does not guarantee an exact match tovminandvmax(the idea being thatvminandvmaxare very often automatically chosen from the data (by default, or when using therobustkeyword), and you don’t want to have a discrete level boundary at e.g.3.12349...).Although the behavior shown in your example is kind of silly, since
vmax=3is obviously “nice” and shouldn’t be truncated. Will take a look at the algorithm. Note that repeating your example withdiscrete=Falseresults in an exact match, because “non-discrete” levels do not have to be ticked at vmin/vmax:@lukelbd This issue still exists in version 0.9.3: