.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "source/auto_examples/plot_cfad.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_source_auto_examples_plot_cfad.py: Example on how to calculate and plot cfad ----------------------------------------- This example shows how to calculate and plot a cfad .. GENERATED FROM PYTHON SOURCE LINES 8-26 .. image-sg:: /source/auto_examples/images/sphx_glr_plot_cfad_001.png :alt: plot cfad :srcset: /source/auto_examples/images/sphx_glr_plot_cfad_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt from act.io.arm import read_arm_netcdf from open_radar_data import DATASETS import radtraq # Read in example data filename = DATASETS.fetch('sgpkazrgeC1.a1.20190529.000002.cdf') ds = read_arm_netcdf(filename) # Calculate CFAD histogram data_array = radtraq.plotting.cfad.calc_cfad(ds, 'reflectivity_copol') # Plot CFAD histogram dims = data_array.dims display = radtraq.plotting.cfad.plot_cfad(data_array, data_array[dims[1]], data_array[dims[0]]) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.665 seconds) .. _sphx_glr_download_source_auto_examples_plot_cfad.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_cfad.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_cfad.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_