.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_density.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_plot_density.py: Density histogramm examples =========================== .. GENERATED FROM PYTHON SOURCE LINES 6-32 .. image:: /gallery/images/sphx_glr_plot_density_001.png :alt: plot density :class: sphx-glr-single-img .. code-block:: default import pandas as pd import toto import matplotlib.pyplot as plt from toto.inputs.txt import TXTfile import os # read the file hindcast='https://raw.githubusercontent.com/calypso-science/Toto/master/_tests/txt_file/tahuna_hindcast.txt' measured='https://raw.githubusercontent.com/calypso-science/Toto/master/_tests/txt_file/tahuna_measured.txt' os.system('wget %s ' % hindcast) os.system('wget %s ' % measured) hd=TXTfile(['tahuna_hindcast.txt'],colNamesLine=1,skiprows=1,unitNamesLine=0,time_col_name={'Year':'year','Month':'month','Day':'day','Hour':'hour','Min':'Minute'}) hd.reads() hd.read_time() hd=hd._toDataFrame() # # Processing hd[0].StatPlots.density_diagramm(X='tp',Y='hs',args={ 'X name':'Wave period', 'Y name':'Significant wave height', 'Y unit':'m', 'X unit':'s', 'Y limits':[0,5], 'X limits':[0,20], 'display':'On', }) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.999 seconds) .. _sphx_glr_download_gallery_plot_density.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_density.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_density.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_