Skip to content

Commit

Permalink
Added Documentation for plotting module
Browse files Browse the repository at this point in the history
  • Loading branch information
TillHuckemann committed Jan 3, 2025
1 parent e96981f commit 436b60b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Welcome to QuMADA's documentation!
device_object
examples
mapping_gui
utils
metadata
qumada

Expand Down
33 changes: 33 additions & 0 deletions docs/utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Other
=========

Plotting with QuMada
---------------------------------

QuMada comes with a few useful scripts for quick plotting of results and easier access to QCoDeS datasets.
You can find the corresponding function in src/qumada/utils/plotting.py and load_from_sqlite.py.

The function "plot_multiple_datasets()" is useful for plotting multiple curves into one plot. Make sure to load the QCoDeS database you want to plot from in advance.
You can either provide a list of datasets you want to plot along with the names of the parameters you want to plot,
or simply leave the datasets argument (and optionally the parameter names empty).
In the latter case, it will guide you through the process of selecting one or more measurements and the parameters you want to plot.

"plot_multiple_datasets" generates automatic legends, labels the axis correctly, can use different markers for different sweep directions, forwards kwargs for matplotlib and more.
Check :ref:`API_DOC` or the docstring for more information. An example is shown below, each of the first three panels was created by using "plot_multiple_datasets".


.. image:: images/plotting_example.png
:alt: Plotting example
:width: 400px
:align: center

The last panel was created with "plot_2D()". Here, the methods "get_parameter_data" and "pick_measurement" from load_from_sqlite are helpful to retrieve and unpack nested QCoDeS datasets.
It is possible to create a 2D plot by calling:

.. code:: python
plot_2D(*get_parameter_data(pick_measurement())
As for plot_multiple_datasets, this will guide you through the selection of a measurement from the current database.
Check :ref:`API_DOC` or the docstring for more information.

0 comments on commit 436b60b

Please sign in to comment.