diff --git a/doc/howitworks.rst b/doc/howitworks.rst index fd05a1c46286e70f70ce0dc21c37532ac37abd13..619bc623b73bc8187af6c825cc68e6a2117ec4c4 100644 --- a/doc/howitworks.rst +++ b/doc/howitworks.rst @@ -164,9 +164,17 @@ This information about the color relates to each trace, so to inspect it in the ] +Using Serializer object vs. matplotlib.pyplot +------------------------------------------ +So far the Serializer class for Matplotlib only supports the subplots and show method, meaning any other operations on the pyplot object will not get serialized and making +such changes to your plot still requires calling the functions on the pyplot object. The reason for this being that the Serializer was not implemented as a fully functional proxy +for the pyplot object like the AxesProxy class is for Axes of matplotlib.axes. + + + What gets serialized -------------------- -PlotSerializer always reads out the main arguments of the plot. Further serialized keyword parameters will be specifically noted. +PlotSerializer in general always reads out the main arguments of the plot function. Further serialized keyword parameters will be specifically noted. As a rule of thumb most options to change the style and look of a diagram will not be serialized and can even distort the data inside the JSON file. Similarly beware of modifying diagrams after creating them. An example of this would be you taking the returned objects of these methods and calling further functions on them, modyfying their attributes. diff --git a/doc/output.rst b/doc/output.rst index 9885e73d6a44f656d057a2a8e860f8f032680fcf..0984db50c1a4a30b77d5e88830c3dfcae08534c0 100644 --- a/doc/output.rst +++ b/doc/output.rst @@ -9,6 +9,12 @@ The JSON string can be accessed via the ``to_json()``-Method on the serializer o serializer.to_json() serializer.write_json_file("test_plot.json") +Writing to paths is also supported, with directories being created if they do not exist. + +.. code-block:: python + + serializer.write_json_file("some_dir/test_plot.json") + Serializing to RO-Crate ----------------------- PloSe allows you to store your plot as an `RO-Crate <https://www.researchobject.org/ro-crate/>`_.