.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/plotting/plot_rhi_cfradial_singlescan.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_examples_plotting_plot_rhi_cfradial_singlescan.py: ====================================================== Create a multiple panel RHI plot from a CF/Radial file ====================================================== An example which creates a RHI plot of a CF/Radial file using a RadarDisplay object. .. GENERATED FROM PYTHON SOURCE LINES 10-49 .. image-sg:: /examples/plotting/images/sphx_glr_plot_rhi_cfradial_singlescan_001.png :alt: RHI :srcset: /examples/plotting/images/sphx_glr_plot_rhi_cfradial_singlescan_001.png :class: sphx-glr-single-img .. code-block:: Python print(__doc__) import matplotlib.pyplot as plt import pyart from pyart.testing import get_test_data filename = get_test_data("sgpxsaprrhicmacI5.c0.20110524.015604_NC4.nc") # create the plot using RadarDisplay radar = pyart.io.read_cfradial(filename) radar.metadata["instrument_name"] = "XSARP" display = pyart.graph.RadarDisplay(radar) fig = plt.figure(figsize=[15, 5]) fig.subplots_adjust(hspace=0.4) xlabel = "Distance from radar (km)" ylabel = "Distance above radar (km)" colorbar_label = "Equivalent reflectivity factor (dBZ)" # nplots = radar.nsweeps fixed_angle = radar.fixed_angle["data"][0] title = f"HSRHI Az={fixed_angle:.3f}" ax = fig.add_subplot(1, 1, 1) display.plot( "reflectivity_horizontal", 0, vmin=-20, vmax=20, mask_outside=True, title="RHI", axislabels=(xlabel, ylabel), cmap="pyart_HomeyerRainbow", colorbar_label=colorbar_label, ax=ax, ) display.set_limits(ylim=[0, 15], ax=ax) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.342 seconds) .. _sphx_glr_download_examples_plotting_plot_rhi_cfradial_singlescan.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_rhi_cfradial_singlescan.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_rhi_cfradial_singlescan.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_