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
I'm a real fan of this library but I still cannot understand how to use colormaps (cool, spring, winter, tab20, coolwarm) when I use a plt.plot() function. I want to plot a continuous line like in your examples, that's why I need to use matplotlib.pyplot.plot() function, but the problem is that you cannot pass cmap parameter to plot().
I tried to set a default colormap but couldn't reach it.
I tried to do like this, but it didn't work
`
import matplotlib.pyplot as plt
import numpy as np
import mplcyberpunk
plt.style.use("cyberpunk")
plt.rcParams['image.cmap'] = 'winter'
x = np.linspace(-5, 5, 100)
y = np.sin(x)
plt.plot(x, y)
mplcyberpunk.add_glow_effects()
plt.show()
`
Please, could you write a code to plot a simple continuous function using a colormap?
The text was updated successfully, but these errors were encountered:
I'm a real fan of this library but I still cannot understand how to use colormaps (cool, spring, winter, tab20, coolwarm) when I use a plt.plot() function. I want to plot a continuous line like in your examples, that's why I need to use matplotlib.pyplot.plot() function, but the problem is that you cannot pass cmap parameter to plot().
I tried to set a default colormap but couldn't reach it.
I tried to do like this, but it didn't work
`
import matplotlib.pyplot as plt
import numpy as np
import mplcyberpunk
plt.style.use("cyberpunk")
plt.rcParams['image.cmap'] = 'winter'
x = np.linspace(-5, 5, 100)
y = np.sin(x)
plt.plot(x, y)
mplcyberpunk.add_glow_effects()
plt.show()
`
Please, could you write a code to plot a simple continuous function using a colormap?
The text was updated successfully, but these errors were encountered: