.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_how_to_import.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_how_to_import.py: How to import gerg_plotting ================================================== This example shows some of the different ways to import the gerg_plotting package. .. GENERATED FROM PYTHON SOURCE LINES 9-11 Method 1: Import just what you need ------------------------------------ .. GENERATED FROM PYTHON SOURCE LINES 11-18 .. code-block:: Python import numpy as np from gerg_plotting import Data, Histogram # Initalize the data object with some sample data data = Data(temperature=np.random.normal(28,size=1000)) hist = Histogram(data) # Assign the histogram plotter to a variable .. GENERATED FROM PYTHON SOURCE LINES 19-21 Method 2: Import the whole package ------------------------------------ .. GENERATED FROM PYTHON SOURCE LINES 21-27 .. code-block:: Python import gerg_plotting as gp # Initalize the data object with some sample data data = gp.Data(temperature=np.random.normal(28,size=1000)) hist = gp.Histogram(data) # Assign the histogram plotter to a variable .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.002 seconds) .. _sphx_glr_download_auto_examples_plot_how_to_import.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_how_to_import.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_how_to_import.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_how_to_import.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_