topostats.plotting#

Attributes#

Functions#

importfromfile(path)

Importing the data needed from the json or csv file specified by the user

savestats(path, dataframetosave)

pathman(path)

Splitting the path into directory and file name; creating or specifying a directory to save the plots

labelunitconversion(plotarg, nm)

Adding units (m or nm) to the axis labels

dataunitconversion(data, plotarg, nm)

Converting the data based on the unit specified by the user. Only nm and m are supported at the moment.

plotkde(df, plotarg[, grouparg, xmin, xmax, nm, specpath])

Creating a KDE plot for the chosen variable. Grouping optional. The x axis range can be defined by the user. The

plotkde2var(df, plotarg[, df2, plotarg2, label1, ...])

Creating a KDE plot for the chosen variable. Grouping optional. The x axis range can be defined by the user. The

plothist(df, plotarg[, grouparg, xmin, xmax, bins, ...])

Creating a histogram for the chosen variable. Grouping optional. The x axis range can be defined by the user. The

plothist2var(df, plotarg[, df2, plotarg2, label1, ...])

Creating a histogram for the chosen variable. Grouping optional. The x axis range can be defined by the user. The

plotdist(df, plotarg[, grouparg, xmin, xmax, bins, ...])

Creating a dist plot, which is the combination of a histogram and a KDE plot; doesn't support grouped plots

plotdist2var(plotarg, plotarg2, df[, df2, xmin, xmax, ...])

Dist plot for 2 variables

plotviolin(df, plotarg[, grouparg, ymin, ymax, nm, ...])

Creating a violin plot for the chosen variable. Grouping optional. The y axis range can be defined by the user.

plotjoint(df, arg1, arg2[, xmin, xmax, ymin, ymax, ...])

Creating a joint plot for two chosen variables. The range for both axes can be defined by the user.

plotLinearVsCircular(contour_lengths_df)

computeStats(data, columns, min, max)

Prints out a table of stats, including the standard deviation, standard error, N value, and peak position

Module Contents#

topostats.plotting.plotting_config#
topostats.plotting.extension = '.png'#
topostats.plotting.colname2label#
topostats.plotting.importfromfile(path)#

Importing the data needed from the json or csv file specified by the user

topostats.plotting.savestats(path, dataframetosave)#
topostats.plotting.pathman(path)#

Splitting the path into directory and file name; creating or specifying a directory to save the plots

topostats.plotting.labelunitconversion(plotarg, nm)#

Adding units (m or nm) to the axis labels

topostats.plotting.dataunitconversion(data, plotarg, nm)#

Converting the data based on the unit specified by the user. Only nm and m are supported at the moment.

topostats.plotting.plotkde(df, plotarg, grouparg=None, xmin=None, xmax=None, nm=False, specpath=None)#

Creating a KDE plot for the chosen variable. Grouping optional. The x axis range can be defined by the user. The default unit is metre, but this can be changed to nanometre by adding ‘nm=True’. The default path is the path under the if __name__ == ‘__main__’ line, but this can also be changed using the specpath argument.

topostats.plotting.plotkde2var(df, plotarg, df2=None, plotarg2=None, label1=None, label2=None, xmin=None, xmax=None, nm=False, specpath=None, grouparg=None)#

Creating a KDE plot for the chosen variable. Grouping optional. The x axis range can be defined by the user. The default unit is metre, but this can be changed to nanometre by adding ‘nm=True’. The default path is the path under the if __name__ == ‘__main__’ line, but this can also be changed using the specpath argument.

topostats.plotting.plothist(df, plotarg, grouparg=None, xmin=None, xmax=None, bins=20, nm=False, specpath=None)#

Creating a histogram for the chosen variable. Grouping optional. The x axis range can be defined by the user. The default unit is metre, but this can be changed to nanometre by adding ‘nm=True’. The default path is the path under the if __name__ == ‘__main__’ line, but this can also be changed using the specpath argument.

topostats.plotting.plothist2var(df, plotarg, df2=None, plotarg2=None, label1=None, label2=None, xmin=None, xmax=None, nm=False, specpath=None, bins=12)#

Creating a histogram for the chosen variable. Grouping optional. The x axis range can be defined by the user. The default unit is metre, but this can be changed to nanometre by adding ‘nm=True’. The default path is the path under the if __name__ == ‘__main__’ line, but this can also be changed using the specpath argument.

topostats.plotting.plotdist(df, plotarg, grouparg=None, xmin=None, xmax=None, bins=20, nm=False, specpath=None, plotname=None)#

Creating a dist plot, which is the combination of a histogram and a KDE plot; doesn’t support grouped plots yet

topostats.plotting.plotdist2var(plotarg, plotarg2, df, df2=None, xmin=None, xmax=None, bins=20, nm=False, specpath=None, plotname=None, c1=None, c2=None, extension='.png')#

Dist plot for 2 variables

topostats.plotting.plotviolin(df, plotarg, grouparg=None, ymin=None, ymax=None, nm=False, specpath=None)#

Creating a violin plot for the chosen variable. Grouping optional. The y axis range can be defined by the user. The default unit is metre, but this can be changed to nanometre by adding ‘nm=True’. The default path is the path under the if __name__ == ‘__main__’ line, but this can also be changed using the specpath argument.

topostats.plotting.plotjoint(df, arg1, arg2, xmin=None, xmax=None, ymin=None, ymax=None, nm=False, specpath=None)#

Creating a joint plot for two chosen variables. The range for both axes can be defined by the user. The default unit is metre, but this can be changed to nanometre by adding ‘nm=True’. The default path is the path under the if __name__ == ‘__main__’ line, but this can also be changed using the specpath argument.

topostats.plotting.plotLinearVsCircular(contour_lengths_df)#
topostats.plotting.computeStats(data, columns, min, max)#

Prints out a table of stats, including the standard deviation, standard error, N value, and peak position

topostats.plotting.bins = 20#