.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_3d.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_plot_3d.py: 3D Plotting with traja ---------------------- Plot trajectories with time in the vertical axis. Note: Adjust matplotlib args ``dist``, ``labelpad``, ``aspect`` and ``adjustable``` as needed. .. GENERATED FROM PYTHON SOURCE LINES 8-14 .. code-block:: Python import traja df = traja.TrajaDataFrame({"x": [0, 1, 2, 3, 4], "y": [1, 3, 2, 4, 5]}) trj = traja.generate(seed=0) .. GENERATED FROM PYTHON SOURCE LINES 15-18 Plot a trajectory in 3D ======================= A 3D plot is generated using :func:`~traja.plotting.plot_3d`. .. GENERATED FROM PYTHON SOURCE LINES 18-19 .. code-block:: Python trj.traja.plot_3d(dist=15, labelpad=32, title="Traja 3D Plot") .. image-sg:: /gallery/images/sphx_glr_plot_3d_001.png :alt: Traja 3D Plot :srcset: /gallery/images/sphx_glr_plot_3d_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.452 seconds) .. _sphx_glr_download_gallery_plot_3d.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_3d.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_3d.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_3d.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_