pygmi.raster.graphs#
Plot Raster Data.
This module provides a variety of methods to plot raster data via the context menu. The following are supported:
Correlation coefficients
Images
Surfaces
Histograms
Classes#
Matplotlib canvas widget for the actual plot. |
|
Plot 2D Correlation Coefficients. |
|
Plot Raster Class. |
|
Plot Surface Class. |
|
Plot Hexbin Class. |
|
Plot Histogram Class. |
Functions#
|
Check that band sizes are the same. |
|
Calculate the 2D correlation. |
Module Contents#
- class pygmi.raster.graphs.MyMplCanvas(parent=None)#
Bases:
matplotlib.backends.backend_qtagg.FigureCanvasQTAgg
Matplotlib canvas widget for the actual plot.
- Parameters:
parent (parent, optional) – Reference to the parent routine. The default is None.
- update_ccoef(data1, dmat)#
Update the correlation coefficient plot.
- Parameters:
data1 (PyGMI raster Data) – raster dataset to be used.
dmat (numpy array) – dummy matrix of numbers to be plotted using pcolor.
- Return type:
None.
- update_raster(data1, cmap)#
Update the raster plot.
- Parameters:
data1 (PyGMI raster Data) – raster dataset to be used in contouring
cmap (str) – Matplotlib colormap description
- Return type:
None.
- update_hexbin(data1, data2)#
Update the hexbin plot.
- Parameters:
data1 (PyGMI raster Data) – raster dataset to be used
data2 (PyGMI raster Data) – raster dataset to be used
- Return type:
None.
- update_surface(data, cmap)#
Update the surface plot.
- Parameters:
data (PyGMI raster Data) – raster dataset to be used
cmap (str) – Matplotlib colormap description
- Return type:
None.
- update_hist(data1, ylog, iscum)#
Update the histogram plot.
- Parameters:
data1 (PyGMI raster Data) – raster dataset to be used
ylog (bool) – Boolean for a log scale on y-axis.
iscum (bool) – Boolean for a cumulative distribution.
- Return type:
None.
- class pygmi.raster.graphs.PlotCCoef(parent=None)#
Bases:
pygmi.misc.ContextModule
Plot 2D Correlation Coefficients.
- Parameters:
parent (parent, optional) – Reference to the parent routine. The default is None.
- run()#
Entry point into the routine, used to run context menu item.
- Return type:
None.
- class pygmi.raster.graphs.PlotRaster(parent=None)#
Bases:
pygmi.misc.ContextModule
Plot Raster Class.
- Parameters:
parent (parent, optional) – Reference to the parent routine. The default is None.
- change_band()#
Combo box to choose band.
- Return type:
None.
- run()#
Entry point into the routine, used to run context menu item.
- Return type:
None.
- class pygmi.raster.graphs.PlotSurface(parent=None)#
Bases:
pygmi.misc.ContextModule
Plot Surface Class.
- Parameters:
parent (parent, optional) – Reference to the parent routine. The default is None.
- change_band()#
Combo box to choose band.
- Return type:
None.
- run()#
Entry point into the routine, used to run context menu item.
- Return type:
None.
- slider()#
Vertical slider used to scale 3d view.
- class pygmi.raster.graphs.PlotScatter(parent=None)#
Bases:
pygmi.misc.ContextModule
Plot Hexbin Class.
A Hexbin is a type of scatter plot which is raster.
- Parameters:
parent (parent, optional) – Reference to the parent routine. The default is None.
- change_band()#
Combo box to choose band.
- Return type:
None.
- run()#
Entry point into the routine, used to run context menu item.
- Return type:
None.
- class pygmi.raster.graphs.PlotHist(parent=None)#
Bases:
pygmi.misc.ContextModule
Plot Histogram Class.
- Parameters:
parent (parent, optional) – Reference to the parent routine. The default is None.
- change_band()#
Combo box to choose band.
- Return type:
None.
- run()#
Entry point into the routine, used to run context menu item.
- Return type:
None.
- pygmi.raster.graphs.check_bands(data)#
Check that band sizes are the same.
- Parameters:
data (list of pygmi.raster.datatypes.Data) – PyGMI raster dataset.
- Returns:
chk – True if sizes are the same, False otherwise.
- Return type:
bool
- pygmi.raster.graphs.corr2d(dat1, dat2)#
Calculate the 2D correlation.
- Parameters:
dat1 (numpy array) – dataset 1 for use in correlation calculation.
dat2 (numpy array) – dataset 2 for use in correlation calculation.
- Returns:
out – array of correlation coefficients
- Return type:
numpy array