.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/3Dvispy/11-share_cameras.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_3Dvispy_11-share_cameras.py: Share camera parameters across multiple canvas ================================================ 这个可以很方便的实现比较两个数据结果 .. image:: ../../_static/cigvis/3Dvispy/11.gif :alt: image :align: center .. GENERATED FROM PYTHON SOURCE LINES 16-37 .. code-block:: default # sphinx_gallery_thumbnail_path = '_static/cigvis/3Dvispy/11.png' import numpy as np import cigvis from pathlib import Path root = Path(__file__).resolve().parent.parent.parent seisp = root / 'data/co2/sx.dat' ni, nx, nt = 192, 192, 240 sx = np.fromfile(seisp, np.float32).reshape(ni, nx, nt) nodes1 = cigvis.create_slices(sx, cmap='Petrel') nodes2 = cigvis.create_slices(sx, cmap='Petrel') cigvis.plot3D( [nodes1, nodes2], grid=(1, 2), # here, define a grid share=True, # here, link all cameras size=(1000, 800), savename='example.png') .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.000 seconds) .. _sphx_glr_download_gallery_3Dvispy_11-share_cameras.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 11-share_cameras.py <11-share_cameras.py>` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 11-share_cameras.ipynb <11-share_cameras.ipynb>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_