Skip to content

Commit e07c3ea

Browse files
committed
Update documentation regarding lines.color
Add a comment to the matplotlibrc template file to alleviate confusion regarding the use of lines.color for plots. axes.color_cycle should be used to change the colour of plotted lines. The Axes.plot docstring has also been update to include this information.
1 parent 2c91aa6 commit e07c3ea

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/matplotlib/axes.py

+5
Original file line numberDiff line numberDiff line change
@@ -3854,6 +3854,11 @@ def plot(self, *args, **kwargs):
38543854
38553855
Return value is a list of lines that were added.
38563856
3857+
By default, each line is assigned a different color specified by a
3858+
'color cycle'. To change this behavior, you can edit the
3859+
axes.color_cycle rcParam. Alternatively, you can use
3860+
:meth:`~matplotlib.axes.Axes.set_default_color_cycle`.
3861+
38573862
The following format string characters are accepted to control
38583863
the line style or marker:
38593864

matplotlibrc.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ backend : %(backend)s
6060
# information on line properties.
6161
#lines.linewidth : 1.0 # line width in points
6262
#lines.linestyle : - # solid line
63-
#lines.color : blue
63+
#lines.color : blue # has no affect on plot(); see axes.color_cycle
6464
#lines.marker : None # the default marker
6565
#lines.markeredgewidth : 0.5 # the line width around the marker symbol
6666
#lines.markersize : 6 # markersize, in points

0 commit comments

Comments
 (0)