Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 25 additions & 15 deletions tutorials/introductory/customizing.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,10 @@
# -----------------------
#
# You can create custom styles and use them by calling `.style.use` with
# the path or URL to the style sheet. Additionally, if you add your
# ``<style-name>.mplstyle`` file to ``mpl_configdir/stylelib``, you can reuse
# your custom style sheet with a call to ``style.use(<style-name>)``. By
# default ``mpl_configdir`` should be ``~/.config/matplotlib``, but you can
# check where yours is with `matplotlib.get_configdir()`; you may need to
# create this directory. You also can change the directory where Matplotlib
# looks for the stylelib/ folder by setting the :envvar:`MPLCONFIGDIR`
# environment variable, see :ref:`locating-matplotlib-config-dir`.
#
# Note that a custom style sheet in ``mpl_configdir/stylelib`` will override a
# style sheet defined by Matplotlib if the styles have the same name.
# the path or URL to the style sheet.
#
# For example, you might want to create
# ``mpl_configdir/stylelib/presentation.mplstyle`` with the following::
# ``./images/presentation.mplstyle`` with the following::
#
# axes.titlesize : 24
# axes.labelsize : 20
Expand All @@ -61,7 +51,26 @@
# good in a presentation, you can just add::
#
# >>> import matplotlib.pyplot as plt
# >>> plt.style.use('presentation')
# >>> plt.style.use('./images/presentation.mplstyle')
#
# Alternatively, you can make your style known to Matplotlib by placing
# your ``<style-name>.mplstyle`` file into ``mpl_configdir/stylelib``. You
# can then load your custom style sheet with a call to
# ``style.use(<style-name>)``. By default ``mpl_configdir`` should be
# ``~/.config/matplotlib``, but you can check where yours is with
# `matplotlib.get_configdir()`; you may need to create this directory. You
# also can change the directory where Matplotlib looks for the stylelib/
# folder by setting the :envvar:`MPLCONFIGDIR` environment variable, see
# :ref:`locating-matplotlib-config-dir`.
#
# Note that a custom style sheet in ``mpl_configdir/stylelib`` will override a
# style sheet defined by Matplotlib if the styles have the same name.
#
# Once your ``<style-name>.mplstyle`` file is in the appropriate
# ``mpl_configdir`` you can specify your style with::
#
# >>> import matplotlib.pyplot as plt
# >>> plt.style.use(<style-name>)
#
#
# Composing styles
Expand Down Expand Up @@ -142,8 +151,9 @@
# kinds of properties, which we call 'rc settings' or 'rc parameters'. You can
# control the defaults of almost every property in Matplotlib: figure size and
# DPI, line width, color and style, axes, axis and grid properties, text and
# font properties and so on. Matplotlib looks for :file:`matplotlibrc` in four
# locations, in the following order:
# font properties and so on. When a URL or path is not specified with a call to
# ``style.use('<path>/<style-name>.mplstyle')``, Matplotlib looks for
# :file:`matplotlibrc` in four locations, in the following order:
#
# 1. :file:`matplotlibrc` in the current working directory, usually used for
# specific customizations that you do not want to apply elsewhere.
Expand Down