<commit_before>.. _plotting-and-images:

.. |yt_plotting_docs| replace:: ``yt`` plotting documentation
.. _yt_plotting_docs: http://yt-project.org/doc

Plotting and Images
===================

.. _plots:

Plots
-----

``jt`` provides an interface to the most common plotting routines in ``yt``: ``SlicePlot``,
``ProjectionPlot``, ``ProfilePlot``, and ``PhasePlot``:

.. code-block:: julia

    function SlicePlot(ds::Dataset, axis, fields; center="c", args...)

    function ProjectionPlot(ds::Dataset, axis, fields; center="c", data_source=nothing, args...)

    function PhasePlot(dc::DataContainer, x_field, y_field, z_fields; args...)

    function ProfilePlot(dc::DataContainer, x_field, y_fields; args...)

Unlike other methods in ``jt``, these return the native ``yt`` Python-based objects. This is
mainly for convenience; it allows one to use all of the annotation and plot modification methods
that hang off these objects. The API for these objects is the same as it is in ``yt``,
which can be found in the |yt_plotting_docs|_. We'll illustrate the plotting functionality with a
 ``SlicePlot`` as an example:

.. code-block:: jlcon<commit_msg>Something weird with this line<commit_after>.. _plotting-and-images:

.. |yt_plotting_docs| replace:: ``yt`` plotting documentation
.. _yt_plotting_docs: http://yt-project.org/doc

Plotting and Images
===================

.. _plots:

Plots
-----

``jt`` provides an interface to the most common plotting routines in ``yt``: ``SlicePlot``,
``ProjectionPlot``, ``ProfilePlot``, and ``PhasePlot``:

.. code-block:: julia

    function SlicePlot(ds::Dataset, axis, fields; center="c", args...)

    function ProjectionPlot(ds::Dataset, axis, fields; center="c", data_source=nothing, args...)

    function PhasePlot(dc::DataContainer, x_field, y_field, z_fields; args...)

    function ProfilePlot(dc::DataContainer, x_field, y_fields; args...)

Unlike other methods in ``jt``, these return the native ``yt`` Python-based objects. This is
mainly for convenience; it allows one to use all of the annotation and plot modification methods
that hang off these objects. The API for these objects is the same as it is in ``yt``,
which can be found in the |yt_plotting_docs|_.

We'll illustrate the plotting functionality with a ``SlicePlot`` as an example:

.. code-block:: jlcon
{'fraction_non_alphanumeric': 0.14735028005170187, 'fraction_numerical': 0.0, 'mean_word_length': 4.677261613691932, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4883649', 'n_tokens_mistral': 716, 'n_tokens_neox': 665, 'n_words': 253}