.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_styles.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Run this example online : - Click :ref:`here ` to download the full example code - Then start `Radis-Lab `__, upload the Jupyter notebook, and run it from there. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_styles.py: ========================= Use different plot themes ========================= Shows how to customize plot styles, using :py:mod:`seaborn` , :py:mod:`matplotlib` or `publib `__ Examples -------- To change it in your user script, set the keys of the ``"plot"`` bloc in :py:attr:`radis.config` : :: import radis radis.config["plot"]["plotlib"] = "seaborn" radis.config["plot"]["context"] = "paper" radis.config["plot"]["style"] = "darkgrid" To change your default settings, edit the ``~/radis.json`` :ref:`Configuration file ` See Also -------- :py:func:`~radis.misc.plot.set_style`, :py:func:`~radis.misc.plot.fix_style`, .. GENERATED FROM PYTHON SOURCE LINES 29-51 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /auto_examples/images/sphx_glr_plot_styles_001.png :alt: matplotlib, , default :srcset: /auto_examples/images/sphx_glr_plot_styles_001.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_plot_styles_002.png :alt: seaborn, paper, darkgrid :srcset: /auto_examples/images/sphx_glr_plot_styles_002.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_plot_styles_003.png :alt: publib, paper, origin :srcset: /auto_examples/images/sphx_glr_plot_styles_003.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_plot_styles_004.png :alt: seaborn, poster, darkgrid :srcset: /auto_examples/images/sphx_glr_plot_styles_004.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_plot_styles_005.png :alt: publib, poster, origin :srcset: /auto_examples/images/sphx_glr_plot_styles_005.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none Calculating Equilibrium Spectrum Physical Conditions ---------------------------------------- Tgas 700 K Trot 700 K Tvib 700 K isotope 1,2,3 mole_fraction 0.1 molecule CO overpopulation None path_length 1 cm pressure_mbar 1013.25 mbar rot_distribution boltzmann self_absorption True state X vib_distribution boltzmann wavenum_max 2300.0000 cm-1 wavenum_min 1900.0000 cm-1 Computation Parameters ---------------------------------------- Tref 296 K add_at_used broadening_method voigt cutoff 1e-27 cm-1/(#.cm-2) dbformat hitran dbpath /home/docs/.radisdb/hitran/CO.hdf5 folding_thresh 1e-06 include_neighbouring_lines True memory_mapping_engine auto neighbour_lines 0 cm-1 optimization simple parfuncfmt hapi parsum_mode full summation pseudo_continuum_threshold 0 sparse_ldm auto truncation 50 cm-1 waveunit cm-1 wstep 0.01 cm-1 zero_padding -1 ---------------------------------------- 0.08s - Spectrum calculated | .. code-block:: default import matplotlib.pyplot as plt import radis plt.close("all") s = radis.test_spectrum() for plotlib, context, style in [ ("matplotlib", "", "default"), ("seaborn", "paper", "darkgrid"), ("publib", "paper", "origin"), ("seaborn", "poster", "darkgrid"), ("publib", "poster", "origin"), ]: radis.config["plot"]["plotlib"] = plotlib radis.config["plot"]["context"] = context radis.config["plot"]["style"] = style s.plot() plt.title(", ".join(f"{v}" for v in radis.config["plot"].values())) plt.tight_layout() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 3.282 seconds) .. _sphx_glr_download_auto_examples_plot_styles.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_styles.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_styles.ipynb `