| [ Web Proxy ] |
| Viewing: https://matplotlib.org/stable/api/_as_gen/../../devel/MEP/../../users/explain/configuration.html | [Back] [Original] |
Note
Go to the end to download the full example code.
Matplotlib's configuration parameters (rcParams) control the behavior and
appearance of plots. These parameters are stored in a dict-like variable
called matplotlib.rcParams (also accessible via plt.rcParams).
The following is a comprehensive reference of all available rcParams and their default values.
8988The port to use for the web server in the WebAgg backend.
'127.0.0.1'The address on which the WebAgg web server should be reachable.
50If webagg.port is unavailable, a number of other random ports will be tried until one that is available is found.
TrueWhen True, open the web browser to the plot that is shown
TrueIf you are running pyplot inside a GUI and your backend choice conflicts, we will automatically try to find a compatible one for you if backend_fallback is True
Falseno description
[]list of dotted.module.name:dotted.callable.name
'toolbar2'{None, toolbar2, toolmanager}
'UTC'a pytz timezone string, e.g., US/Central or Europe/Paris
Default properties for line objects, such as those returned by plot().
1.5line width in points
'-'solid line
'C0'has no affect on plot(); see axes.prop_cycle
'None'the default marker
'auto'the default marker face color
'auto'the default marker edge color
1.0the line width around the marker symbol
6.0marker size, in points
'round'{miter, round, bevel}
'butt'{butt, round, projecting}
'round'{miter, round, bevel}
'projecting'{butt, round, projecting}
Truerender lines in antialiased (no jaggies)
[3.7, 1.6]The dash pattern for linestyle 'dashed'
[6.4, 1.6, 1.0, 1.6]The dash pattern for linestyle 'dashdot'
[1.0, 1.65]The dash pattern for linestyle 'dotted'
Trueno description
'full'{full, left, right, bottom, top, none}
'auto'no description
TrueWhether to snap the mesh to pixel boundaries. This is provided solely to allow old test images to remain unchanged. Set to False to obtain the previous behavior.
1.0edge width in points.
'C0'no description
'black'By default, Patches and Collections do not draw edges. This value is only used if facecolor is "none" (an Artist without facecolor and edgecolor would be invisible) or if patch.force_edgecolor is True.
FalseBy default, Patches and Collections do not draw edges. Set this to True to draw edges with patch.edgedcolor as the default edgecolor. This is mainly relevant for styles.
Truerender patches in antialiased (no jaggies)
'edge'no description
1.0no description
Falseno description
Trueno description
1.5no description
Noneno description
Falseno description
Falseno description
Trueno description
Trueno description
Trueno description
Falseno description
'black'no description
'o'no description
'none'no description
'black'no description
1.0no description
6.0no description
'none'no description
1.0no description
'black'no description
1.0no description
'-'no description
'black'no description
1.0no description
'-'no description
'black'no description
1.0no description
'-'no description
'C1'no description
1.0no description
'-'no description
'C2'no description
'^'no description
'C2'no description
'C2'no description
6.0no description
'--'no description
1.0no description
The font properties used by Text See https://matplotlib.org/stable/api/font_manager_api.html for more information on font properties. The 6 font properties used for font matching are given below with their default values.
['sans-serif']no description
'normal'no description
'normal'no description
'normal'no description
'normal'no description
10.0no description
['DejaVu Serif', 'Bitstream Vera Serif', 'Computer Modern Roman', 'New Century Schoolbook', 'Century Schoolbook L', 'Utopia', 'ITC Bookman', 'Bookman', 'Nimbus Roman No9 L', 'Times New Roman', 'Times', 'Palatino', 'Charter', 'serif']no description
['DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', 'sans-serif']no description
['Apple Chancery', 'Textile', 'Zapf Chancery', 'Sand', 'Script MT', 'Felipa', 'Comic Neue', 'Comic Sans MS', 'cursive']no description
['Chicago', 'Charcoal', 'Impact', 'Western', 'xkcd script', 'fantasy']no description
['DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Computer Modern Typewriter', 'Andale Mono', 'Nimbus Mono L', 'Courier New', 'Courier', 'Fixed', 'Terminal', 'monospace']no description
TrueIf True, then Unicode Consortium's Last Resort font will be appended to all font selections. This ensures that there will always be a glyph displayed.
'black'no description
NoneThe language of the text in a format accepted by libraqm, namely a BCP47 language code. If None, then no particular language will be implied, and default font settings will be used.
'default'FreeType hinting flag ("foo" corresponds to FT_LOAD_FOO); may be one of the following (Proprietary Matplotlib-specific synonyms are given in parentheses, but their use is discouraged): - default: Use the font's native hinter if possible, else FreeType's auto-hinter. ("either" is a synonym).- no_autohint: Use the font's native hinter if possible, else don't hint. ("native" is a synonym.)- force_autohint: Use FreeType's auto-hinter. ("auto" is a synonym.)- no_hinting: Disable hinting. ("none" is a synonym.)
None[DEPRECATED] This setting has no effect.
None[DEPRECATED] Specifies the scaling factor for kerning values. This is provided solely to allow old test images to remain unchanged. Set to 6 to obtain previous behavior. Values other than 0 or 6 have no defined meaning.
TrueIf True (default), the text will be antialiased. This only affects raster outputs.
TrueUse mathtext if there is an even number of unescaped dollar signs.
Falseuse latex for all text handling. The following fonts are supported through the usual rc parameter settings: new century schoolbook, bookman, times, palatino, zapf chancery, charter, serif, sans-serif, helvetica, avant garde, courier, monospace, computer modern roman, computer modern sans serif, computer modern typewriter
'latex'The TeX engine/format to use. The following values are supported: - 'latex': The classic TeX engine (the current default). All backends render TeX's output by parsing the DVI output into glyphs and boxes and emitting those one by one. - 'latex+dvipng': The same as 'latex', with the exception that Agg-based backends rely on dvipng to rasterize TeX's output. This value was the default up to Matplotlib 3.10.
''IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO. text.latex.preamble is a single line of LaTeX code that will be passed on to the LaTeX system. It may contain any code that is valid for the LaTeX "preamble", i.e. between the "documentclass" and "begin{document}" statements. Note that it has to be put on a single line, which may become quite long. The following packages are always loaded with usetex, so beware of package collisions: color, fix-cm, geometry, graphicx, textcomp. PostScript (PSNFSS) font packages may also be loaded, depending on your font settings.
'dejavusans'Should be 'dejavusans' (default), 'dejavuserif', 'cm' (Computer Modern), 'stix', 'stixsans' or 'custom'
'sans:bold'no description
'sans:italic:bold'no description
'cursive'no description
'sans:italic'no description
'sans'no description
'sans'no description
'monospace'no description
'cm'Select fallback font from ['cm' (Computer Modern), 'stix', 'stixsans'] when a symbol cannot be found in one of the custom math fonts. Select 'None' to not perform fallback and replace the missing character by a dummy symbol.
'normal'The default font to use for math. Can be any of the LaTeX font names, including the special name "regular" for the same font used in regular text.
'white'axes background color
'black'axes edge color
0.8edge line width
Falsedisplay grid or not
'both'which axis the grid should apply to
'major'grid lines at {major, minor, both} ticks
'center'alignment of the title: {left, right, center}
'large'font size of the axes title
'normal'font weight of title
'auto'color of the axes title, auto falls back to text.color as default value
Noneposition title (axes relative units). None implies auto
6.0pad between axes and title in points
'medium'font size of the x and y labels
4.0space between label and axis
'normal'weight of the x and y labels
'black'no description
'line'draw axis gridlines and ticks: - below patches (True) - above patches but below lines ('line') - above all (False)
[-5, 6]use scientific notation if log10 of the axis range is smaller than the first or larger than the second
FalseWhen True, format tick labels according to the user's locale. For example, use ',' as a decimal separator in the fr_FR locale.
FalseWhen True, use mathtext for scientific notation.
0minimum exponent to format in scientific notation
TrueIf True, the tick label formatter will default to labeling ticks relative to an offset when the data range is small compared to the minimum absolute value of the data.
4When useoffset is True, the offset will be used when it can remove at least this number of significant digits from tick labels.
Truedisplay axis spines
Trueno description
Trueno description
Trueno description
Trueuse Unicode for the minus symbol rather than hyphen. See https://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes
cycler('color', [(0.12156862745098039, 0.4666666666666667, 0.7058823529411765), (1.0, 0.4980392156862745, 0.054901960784313725), (0.17254901960784313, 0.6274509803921569, 0.17254901960784313), (0.8392156862745098, 0.15294117647058825, 0.1568627450980392), (0.5803921568627451, 0.403921568627451, 0.7411764705882353), (0.5490196078431373, 0.33725490196078434, 0.29411764705882354), (0.8901960784313725, 0.4666666666666667, 0.7607843137254902), (0.4980392156862745, 0.4980392156862745, 0.4980392156862745), (0.7372549019607844, 0.7411764705882353, 0.13333333333333333), (0.09019607843137255, 0.7450980392156863, 0.8117647058823529)])no description
0.05x margin. See margins
0.05y margin. See margins
0.05z margin. See margins
'data'If "data", use axes.xmargin and axes.ymargin as is. If "round_numbers", after application of margins, axis limits are further expanded to the nearest "round" number.
Truedisplay grid on polar axes
Truedisplay grid on 3D axes
Falseautomatically add margin when manually setting 3D axis limits
(0.95, 0.95, 0.95, 0.5)background pane on 3D axes
(0.9, 0.9, 0.9, 0.5)background pane on 3D axes
(0.925, 0.925, 0.925, 0.5)background pane on 3D axes
Truedepth shade for 3D scatter plots
0.3minimum alpha value for depth shading
'arcball'{azel, trackball, sphere, arcball} See also https://matplotlib.org/stable/api/toolkits/mplot3d/view_angles.html#rotation-with-mouse
0.667trackball diameter, in units of the Axes bbox
0.2trackball border width, in units of the Axes bbox (only for 'sphere' and 'arcball' style)
5.0Snap angle (in degrees) for 3D rotation when holding Control.
'center'alignment of the xaxis label: {left, right, center}
'center'alignment of the yaxis label: {bottom, top, center}
Default properties for date tick labels. These are used by the AutoDateFormatter when the appropriate time unit is detected.See https://matplotlib.org/stable/api/dates_api.html#date-formatters for more information.
'%Y'no description
'%Y-%m'no description
'%Y-%m-%d'no description
'%m-%d %H'no description
'%d %H:%M'no description
'%H:%M:%S'no description
'%M:%S.%f'no description
'1970-01-01T00:00:00'The reference date for Matplotlib's internal date representation. See https://matplotlib.org/stable/gallery/ticks/date_precision_and_epochs.html
'auto''auto', 'concise'
TrueFor auto converter whether to use interval_multiples
Falsedraw ticks on the top side
Truedraw ticks on the bottom side
Falsedraw label on the top
Truedraw label on the bottom
3.5major tick size in points
2.0minor tick size in points
0.8major tick width in points
0.6minor tick width in points
3.5distance to major tick label in points
3.4distance to the minor tick label in points
'black'color of the ticks
'inherit'color of the tick labels or inherit from xtick.color
'medium'font size of the tick labels
'out'direction: {in, out, inout}
Falsevisibility of minor ticks on x-axis
Truedraw x axis top major ticks
Truedraw x axis bottom major ticks
Truedraw x axis top minor ticks
Truedraw x axis bottom minor ticks
'auto'number of minor ticks between the major ticks on x-axis
'center'alignment of xticks
Truedraw ticks on the left side
Falsedraw ticks on the right side
Truedraw tick labels on the left side
Falsedraw tick labels on the right side
3.5major tick size in points
2.0minor tick size in points
0.8major tick width in points
0.6minor tick width in points
3.5distance to major tick label in points
3.4distance to the minor tick label in points
'black'color of the ticks
'inherit'color of the tick labels or inherit from ytick.color
'medium'font size of the tick labels
'out'direction: {in, out, inout}
Falsevisibility of minor ticks on y-axis
Truedraw y axis left major ticks
Truedraw y axis right major ticks
Truedraw y axis left minor ticks
Truedraw y axis right minor ticks
'auto'number of minor ticks between the major ticks on y-axis
'center_baseline'alignment of yticks
'#b0b0b0'b0b0b0" # grid color
'-'solid
0.8in points
1.0transparency, between 0.0 and 1.0
NoneIf None defaults to grid.color
NoneIf None defaults to grid.linestyle
NoneIf None defaults to grid.linewidth
NoneIf None defaults to grid.alpha
NoneIf None defaults to grid.color
NoneIf None defaults to grid.linestyle
NoneIf None defaults to grid.linewidth
NoneIf None defaults to grid.alpha
'best'no description
Trueif True, draw the legend on a background patch
0.8legend patch transparency
'inherit'inherit from axes.facecolor; or color spec
'0.8'background patch boundary color
Noneline width of the legend frame, None means inherit from patch.linewidth
Trueif True, use a rounded box for the legend background, else a rectangle
Falseif True, give background a shadow effect
1the number of marker points in the legend line
1number of scatter points
1.0the relative size of legend markers vs. original
'medium'no description
'None'no description
NoneNone sets to the same as the default axes.
0.4border whitespace
0.5the vertical space between the legend entries
2.0the length of the legend lines
0.7the height of the legend handle
0.8the space between the legend line and legend text
0.5the border between the axes and legend edge
2.0column separation
'large'size of the figure title (Figure.suptitle())
'normal'weight of the figure title
'large'size of the figure label (Figure.sup[x|y]label())
'normal'weight of the figure label
[6.4, 4.8]figure size in inches
100.0figure dots per inch
'white'figure face color
'white'figure edge color
Trueenable figure frame
20The maximum number of figures to open through the pyplot interface before emitting a warning. If less than one this feature is disabled.
TrueRaise the GUI window to front when show() is called. If set to False, we currently do not take any further actions and whether the window appears on the front may depend on the GUI framework and window manager.
0.125the left side of the subplots of the figure
0.9the right side of the subplots of the figure
0.11the bottom of the subplots of the figure
0.88the top of the subplots of the figure
0.2the amount of width reserved for space between subplots, expressed as a fraction of the average axis width
0.2the amount of height reserved for space between subplots, expressed as a fraction of the average axis height
FalseWhen True, automatically adjust subplot parameters to make the plot fit the figure using tight_layout
FalseWhen True, automatically make plot elements fit on the figure. (Not compatible with "figure.autolayout", above).
0.04167Padding (in inches) around axes; defaults to 3/72 inches, i.e. 3 points
0.04167Padding (in inches) around axes; defaults to 3/72 inches, i.e. 3 points
0.02Spacing between subplots, relative to the subplot sizes. Much smaller than for tight_layout (figure.subplot.hspace, figure.subplot.wspace) as constrained_layout already takes surrounding texts (titles, labels, # ticklabels) into account.
0.02Spacing between subplots, relative to the subplot sizes. Much smaller than for tight_layout (figure.subplot.hspace, figure.subplot.wspace) as constrained_layout already takes surrounding texts (titles, labels, # ticklabels) into account.
'equal'{equal, auto} or a number
'auto'see help(imshow) for options
'auto'see help(imshow) for options
'viridis'A colormap name (plasma, magma, etc.)
256the size of the colormap lookup table
'upper'{lower, upper}
Trueno description
TrueWhen True, all the images on a set of axes are combined into a single composite image before saving a figure as a vector graphics file, such as a PDF.
'dashed'string or on-off ink sequence
True{True, False}
None{float, None} Size of the contour line widths. If set to None, it falls back to "line.linewidth".
'mpl2014'{mpl2005, mpl2014, serial, threaded}
0.0length of end cap on error bars in pixels
Nonethickness of end cap on error bars in points.
Noneline width of the error bar lines in points.
10The default number of histogram bins or 'auto'.
'o'The default marker type for scatter plots.
'face'The default edge colors for scatter plots.
00 to disable; values in the range 10000 to 100000 can improve speed slightly and prevent an Agg rendering failure when plotting very large data sets, especially if they are very gappy. It may cause minor artifacts, though. A value of 20000 is probably a good starting point.
TrueWhen True, simplify paths by removing "invisible" points to reduce file size and increase rendering speed
0.111111111111The threshold of similarity below which vertices will be removed in the simplification process.
TrueWhen True, rectilinear axis-aligned paths will be snapped to the nearest pixel when certain criteria are met. When False, paths will never be snapped.
NoneMay be None, or a tuple of the form:path.sketch: (scale, length, randomness)- scale is the amplitude of the wiggle perpendicular to the line (in pixels).- length is the length of the wiggle along the line (in pixels).- randomness is the factor by which the length is randomly scaled.
[]no description
'figure'figure dots per inch or 'figure'
'auto'figure face color when saving
'auto'figure edge color when saving
'png'{png, ps, pdf, svg}
None{tight, standard} 'tight' is incompatible with generating frames for animation
0.1padding to be used, when bbox is set to 'tight'
'~'default directory in savefig dialog, gets updated after interactive saves, unless set to the empty string (i.e. the current directory); use '.' to start at the current directory but update after interactive saves
Falsewhether figures are saved with a transparent background by default
'portrait'orientation of saved figure, for PostScript output only
'system'How to open new figures (system, tab, window) system uses the MacOS system preferences
FalseMaintain shell focus for TkAgg
'letter'{figure, letter, legal, ledger, A0-A10, B0-B10}
Falseuse AFM fonts, results in small files
None{ghostscript, xpdf, None} Experimental: may produce smaller files. xpdf intended for production of publication quality files, but requires ghostscript, xpdf and ps2eps
6000dpi
3Output Type 3 (Type3) or Type 42 (TrueType)
6integer from 0 to 9 0 disables compression (good for debugging)
3Output Type 3 (Type3) or Type 42 (TrueType)
Falseno description
Falseno description
TrueWrite raster image data directly into the SVG file
'path'How to handle SVG fonts: path: Embed characters as paths -- supported by most SVG renderersnone: Assume fonts are installed on the machine where the SVG will be viewed.
NoneIf not None, use this string as hash salt instead of uuid4
NoneIf not None, use this string as the value for the id attribute in the top <svg> tag
Trueno description
''See text.latex.preamble for documentation
'xelatex'no description
Falseset this when you want to generate hardcopy docstring
Default key mappings for interactive navigation. See Navigation keyboard shortcuts.
['f', 'ctrl+f']toggling
['h', 'r', 'home']home or reset mnemonic
['left', 'c', 'backspace', 'MouseButton.BACK']forward / backward keys
['right', 'v', 'MouseButton.FORWARD']for quick navigation
['p']pan mnemonic
['o']zoom mnemonic
['s', 'ctrl+s']saving current figure
['f1']display help about active tools
['ctrl+w', 'cmd+w', 'q']close the current figure
[]close all figures
['g']switching on/off major grids in current axes
['G']switching on/off minor grids in current axes
['l']toggle scaling of y-axes ('log'/'linear')
['k', 'L']toggle scaling of x-axes ('log'/'linear')
['ctrl+c', 'cmd+c']copy figure to clipboard
'none'How to display the animation as HTML in the IPython notebook: - 'html5' uses HTML5 video tag - 'jshtml' creates a JavaScript animation
'ffmpeg'MovieWriter 'backend' to use
'h264'Codec to use for writing movie
-1Controls size/quality trade-off for movie. -1 implies let utility auto-determine
'png'Controls frame format used by temp files
'ffmpeg'Path to ffmpeg binary. Unqualified paths are resolved by subprocess.Popen.
[]Additional arguments to pass to ffmpeg
'convert'Path to ImageMagick's convert binary. Unqualified paths are resolved by subprocess.Popen, except that on Windows, we look up an install of ImageMagick in the registry (as convert is also the name of a system tool).
['-layers', 'OptimizePlus']Additional arguments to pass to convert
20.0Limit, in MB, of size of base64 encoded animation in HTML (i.e. IPython notebook)
Noneno description
| Web Proxy Viewer | New URL | Original Page |