gsflow.output.prms_plot Module¶
-
class
gsflow.output.prms_plot.
PrmsPlot
(prms_dis=None, extent=None)[source]¶ Plotting class for PRMS data
- Parameters
- prms_disPrmsDiscretization object, optional
- extenttuple of floats, optional
plot extent, if None PrmsPlot will get extent from PrmsDiscretization
Examples
create a plot object and plot an array
>>> import gsflow >>> dis = gsflow.output.PrmsDiscretization.load_from_shapefile("myshp.shp") >>> plot = gsflow.output.PrmsPlot(prms_dis=dis) >>> array = np.random((dis.nhru,)) >>> ax = plot.plot_array(array) >>> plt.show()
Methods
contour_array
(self, array[, ax, masked_values])Contour an array.
contour_parameter
(self, parameter[, ax, …])Contour an array.
plot_array
(self, array[, ax, masked_values])General array plotter
plot_model_discretization
(self[, ax])Plots the model grid
plot_parameter
(self, parameter[, ax, …])Method to plot a parameter from a ParameterRecord
-
contour_array
(self, array, ax=None, masked_values=None, **kwargs)[source]¶ Contour an array.
- Parameters
- anumpy.ndarray
Array to plot.
- axmatplotlib.pyplot.axes
optional axes object
- masked_valueslist, optional
list of values to mask.
- **kwargsdictionary
keyword arguments passed to matplotlib.pyplot.pcolormesh
- Returns
- contour_setmatplotlib.tri.tricontour object
-
contour_parameter
(self, parameter, ax=None, masked_values=None, **kwargs)[source]¶ Contour an array.
- Parameters
- parameterPrmsParameter object
- axmatplotlib.pyplot.axes
optional axes object
- masked_valuesiterable of floats, ints
Values to mask.
- **kwargsdictionary
keyword arguments passed to matplotlib.pyplot.pcolormesh
- Returns
- contour_setmatplotlib.tri.tricontour object
-
plot_array
(self, array, ax=None, masked_values=None, **kwargs)[source]¶ General array plotter
- Parameters
- arrayarray to plot.
size must be equal to nhru
- axmatplotlib.pyplot.axes
- masked_valueslist, optional
list of values to mask from plotting
- kwargsmatplotlib keyword arguments
- Returns
- matplotlib.collections.PatchCollection
-
plot_model_discretization
(self, ax=None, **kwargs)[source]¶ Plots the model grid
- Parameters
- axmatplotlib.axes object, optional
- kwargs :
matplotlib keyword arguments
-
plot_parameter
(self, parameter, ax=None, masked_values=None, **kwargs)[source]¶ Method to plot a parameter from a ParameterRecord
- Parameters
- parameterPrmsParameter object
- axmatplotlib.pyplot.axes
- masked_valueslist, optional
list of values to mask from plotting
- kwargsmatplotlib keyword arguments
- Returns
- matplotlib.collections.PatchCollection or
matplotlib.figure.Figure