Open
Description
Description
I'm trying to clip colors in a scatter plot using norm
, but the keyword argument seems to be ignored, unless I pass a DiscreteNorm
Steps to reproduce
import proplot as pplt
import matplotlib.pyplot as plt
from matplotlib.colors import Normalize
import numpy as np
print(pplt.__version__)
import matplotlib
print(matplotlib.__version__)
x = np.arange(10)
y = np.random.rand(10)
c = x**2
fig, ax = pplt.subplots()
ax.scatter(x, y, c=c, cmap='viridis', norm=pplt.Norm('linear', 0., 1.))
ax.format(title='proplot')
pplt.show()
fig, ax = pplt.subplots()
ax.scatter(x, y, c=c, cmap='viridis', norm=pplt.DiscreteNorm(np.linspace(0, 1, 6)))
ax.format(title='proplot discrete')
pplt.show()
fig, ax = plt.subplots()
ax.scatter(x, y, c=c, cmap='viridis', norm=Normalize(0, 1))
ax.set_title("matplotlib")
pplt.show()
Proplot version
matplotlib: 3.4.3
proplot: 0.9.5