.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/2D/10-plot2d_ticks.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_gallery_2D_10-plot2d_ticks.py: Set axis range ================================== Set the Y-axis as the time axis, starting at 1s, interval 2ms, Set the x-axis to the x-coordinate, starting at 4098 and every 12.5m .. image:: ../../_static/cigvis/2D/10.png :alt: image :align: center .. GENERATED FROM PYTHON SOURCE LINES 17-37 .. code-block:: default # sphinx_gallery_thumbnail_path = '_static/cigvis/2D/10.png' import cigvis import numpy as np d = np.fromfile('../../data/rgt/sx.dat', np.float32).reshape(128, 128, 128) sl = d[30, :, :] cigvis.plot2d( sl, figsize=(6, 6), xlabel='xline/m', ylabel='time/s', title='set tick labels', xsample=[4098, 12.5], # [start, step] ysample=[1, 0.02], # [start, step] cbar='Amplitude', save='example.png', dpi=200) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.000 seconds) .. _sphx_glr_download_gallery_2D_10-plot2d_ticks.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 10-plot2d_ticks.py <10-plot2d_ticks.py>` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 10-plot2d_ticks.ipynb <10-plot2d_ticks.ipynb>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_