topostats.plotting#
Attributes#
Functions#
|
Importing the data needed from the json or csv file specified by the user |
|
|
|
Splitting the path into directory and file name; creating or specifying a directory to save the plots |
|
Adding units (m or nm) to the axis labels |
|
Converting the data based on the unit specified by the user. Only nm and m are supported at the moment. |
|
Creating a KDE plot for the chosen variable. Grouping optional. The x axis range can be defined by the user. The |
|
Creating a KDE plot for the chosen variable. Grouping optional. The x axis range can be defined by the user. The |
|
Creating a histogram for the chosen variable. Grouping optional. The x axis range can be defined by the user. The |
|
Creating a histogram for the chosen variable. Grouping optional. The x axis range can be defined by the user. The |
|
Creating a dist plot, which is the combination of a histogram and a KDE plot; doesn't support grouped plots |
|
Dist plot for 2 variables |
|
Creating a violin plot for the chosen variable. Grouping optional. The y axis range can be defined by the user. |
|
Creating a joint plot for two chosen variables. The range for both axes can be defined by the user. |
|
|
|
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#