Plot data from a SKIRT stored table file. More...
Functions | |
def | plotStoredTableCurve (tableFilePath, horAxis=0, verAxis=0, *axis0=None, axis1=None, axis2=None, axis3=None, axis4=None, outDirPath=None, outFileName=None, outFilePath=None, figSize=(8, 6), interactive=None) |
This function creates a plot of a particular 1D curve from the data in a specified SKIRT stored table file. More... | |
def | plotStoredTableInteractive (tableFilePath, *figSize=(8, 6)) |
This function creates an interactive plot of a 1D curve from the data in a specified SKIRT stored table file. More... | |
Plot data from a SKIRT stored table file.
This module offer functions to create plots from the data in a SKIRT stored table file.
def pts.visual.plotstoredtable.plotStoredTableCurve | ( | tableFilePath, | |
horAxis = 0 , |
|||
verAxis = 0 , |
|||
* | axis0 = None , |
||
axis1 = None , |
|||
axis2 = None , |
|||
axis3 = None , |
|||
axis4 = None , |
|||
outDirPath = None , |
|||
outFileName = None , |
|||
outFilePath = None , |
|||
figSize = (8, 6) , |
|||
interactive = None |
|||
) |
This function creates a plot of a particular 1D curve from the data in a specified SKIRT stored table file.
The function accepts the following optional arguments to configure the plot:
Thus, by default, the script plots the first table quantity as a function of the first table axis, with half-way values for the other axes, if any.
The table file path is interpreted as described for the pts.utils.absPath() function. By default, the figure is saved as FigStoredTable.pdf in the current directory. This can be overridden with the out* arguments as described for the pts.utils.savePath() function. In interactive mode (see the pts.utils.interactive() function), the figure is not saved and it is left open so that is displayed in notebooks.
def pts.visual.plotstoredtable.plotStoredTableInteractive | ( | tableFilePath, | |
* | figSize = (8, 6) |
||
) |
This function creates an interactive plot of a 1D curve from the data in a specified SKIRT stored table file.
It is intended for use from a notebook environment such as the one offered by Jupyter notebook. The stored table file path and the figure size are passed as arguments to this function. Other aspects of the plot, such as what to show on the horizontal and vertical axis, can be configured interactively via a user interface created through the ipywidgets package using the metadata in the stored table file.
The table file path is interpreted as described for the pts.utils.absPath() function. The generated figure is not saved and is left open so that is displayed in notebooks.
The function returns the stored table dictionary loaded by pts.storedtable.io.readStoredTable so that the interactive user can inspect its contents in further detail if desired.