gnssrefl.quickplt module
- gnssrefl.quickplt.main()
quick file plotting using matplotlib
A png file is saved as temp.png or to your preferred filename if outfile is given. In either case, it goes to REFL_CODE/Files
Allows you to set x and y-axis limits with a title and various axes labels
a different symbol can also be set
Someone could easily update this to include different filetypes (e.g. jpeg)
Examples
- quickplt txtfile 1 16
would plot column 1 on the x-axis and column 16 on the y-axis
- quickplt txtfile 1 16 -xlabel Time
would plot column 1 on the x-axis and column 16 on the y-axis and add Time on the x-axis label
- quickplt txtfile 1 16 -xlabel “Time (sec)”
would plot column 1 on the x-axis and column 16 on the y-axis and add Time (sec) on the x-axis label, but need quote marks since you have spaces in the x-axis labe.
- quickplt txtfile 1 16 -reverse T
would plot column 1 on the x-axis and column 16 on the y-axis it would reverse the y-axis parameter as you might want if you are ploting RH but want it to have the same sense as a tide gauge.
- quickplt txtfile 1 16 -ylimits 0 2
would restrict y-axis to be between 0 and 2
- quickplt txtfile 1 16 -outfile myfile.png
would save png file to $REFL_CODE/Files/myfile.png
- Parameters:
filename (str) – name of file to be plotted
xcol (str) – column number in the file for the x-axis parameter
ycol (str) – column number in the file for the y-axis parameter
mjd (str) – T or True, code will convert MJD to datetime, optional
xlabel (str, optional) – label for x-axis
ylabel (str) – label for y-axis
symbol (str, optional) – prescibe the marker used in the plot
reverse (str, optional) – T or True, to reverse y-axis limits
title (str, optional) – title for plot
outfile (str, optional) – name of png file to store plot
ylimits (float, optional) – pair of yaxis limits
xlimits (float, optional) – pair of xaxis limits
freq (integer, optional) – use column 11 to find (and extract) a single frequency