For Matplotlib 2.2, using the cycler
module will do the trick, without the need to convert to Hex values.
import cycler
n = 100
color = pyplot.cm.viridis(np.linspace(0, 1,n))
mpl.rcParams['axes.prop_cycle'] = cycler.cycler('color', color)
More Related Contents:
- matplotlib: can I create AxesSubplot objects, then add them to a Figure instance?
- Setting different color for each series in scatter plot on matplotlib
- _tkinter.TclError: no display name and no $DISPLAY environment variable
- Reverse Y-Axis in PyPlot
- How to manually create a legend
- Defining the midpoint of a colormap in matplotlib
- How to plot multiple functions on the same figure, in Matplotlib?
- find length of sequences of identical values in a numpy array (run length encoding)
- Plotting grouped data in same plot using Pandas
- How to highlight specific x-value ranges
- How to set a single, main title above all the subplots with Pyplot?
- Matplotlib: how to set the current figure?
- Strange error with matplotlib axes labels
- Using Pandas Value_Counts and matplotlib
- How to plot two columns of a pandas data frame using points
- How do I make a single legend for many subplots?
- What does the argument mean in fig.add_subplot(111)?
- Matplotlib plotting in wrong order
- Saving plots (AxesSubPlot) generated from python pandas with matplotlib’s savefig
- Creating graph with date and time in axis labels with matplotlib
- scipy.curve_fit() returns multiple lines
- Get data points from Seaborn distplot
- Line plot with arrows in matplotlib
- Plot a 3D surface from {x,y,z}-scatter data
- How to decode color mapping in matplotlib’s Colormap?
- Using pandas crosstab to create a bar plot
- pylab.hist(data, normed=1). Normalization seems to work incorrect
- Move spines in matplotlib 3d plot?
- Setting Different error bar colors in bar plot in matplotlib
- Matplotlib – Wrong overlapping when plotting two 3D surfaces on the same axes