Note
• The axis is not adjusted automatically if you execute text without specifying anything for axis. If the
text string extends beyond the drawing screen, specify the axis manually.
• The color of text strings drawn with text is always black.
Color Keywords
The keywords shown in the tables below can be used as grid, plot, and arrow arguments to specify colors.
To specify this color:
Blue
Red
Green
Magenta
Black
Cyan
Yellow
Note
• Color keywords can be input using C > [matplotlib.pyplot].
Auto Color Specification
When a graph is drawn using a single execution of plot
the color. When these functions are executed in succession to draw graphs, the graph colors are automatically
specified in the following sequence:
Each execution of show causes the auto graph color sequence to return to blue.
* For the plot function, the color is automatically assigned only when the color argument is omitted.
Example:
To use plot and bar to draw two graphs in succession. Omit the plot color argument.
from matplotlib.pyplot import *
plot([1,1.5,2.5])
plot([0,0.5,0.2])
bar(1,1)
bar([2,3],[2,3])
show()
Operation results are shown below.
Use this keyword:
"b" or "blue"
"r" or "red"
"g" or "green"
"m" or "magenta"
"k" or "black"
"c" or "cyan"
"y" or "yellow"
blue
red
yellow
cyan
129
To specify this color:
White
Grey
Orange
Purple
Brown
Pink
*
, bar , scatter, or hist , blue is automatically specified as
green
magenta
black
Use this keyword:
"w" or "white"
"grey"
"orange"
"purple"
"brown"
"pink"
Need help?
Do you have a question about the CLASSWIZ CG and is the answer not in the manual?
Questions and answers