Wrapper module for plplot to give it a more matplotlib like personality
Count data in each bin
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | d | Data for binning |
|
integer, | intent(in), | optional | :: | N | Number of bins |
|
real(kind=wp), | intent(in), | optional | dimension(2) | :: | db | Boundaries of bin range |
integer, | intent(in), | optional | :: | normalize | Normalization type (1=sum, 2=bin size, 3=maxval) |
Create a new figure
Create a set of axes on a figure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ny | Number of subplot rows |
||
integer, | intent(in) | :: | nx | Number of subplot columns |
||
integer, | intent(in) | :: | i | Subplot to use |
||
real(kind=wp), | intent(in), | optional | :: | aspect | Aspect ratio of the axes |
|
logical, | intent(in), | optional | :: | is3d |
Set the x and y ranges of the plot
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(2) | :: | xb | x-range of plot |
|
real(kind=wp), | intent(in), | dimension(2) | :: | yb | y-range of plot |
Set the limits of the x-axis
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | xl | |||
real(kind=wp), | intent(in) | :: | xh |
Set the limits of the y-axis
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | yl | |||
real(kind=wp), | intent(in) | :: | yh |
Set the limits for a 3d plot
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(2) | :: | xb | x-range of plot |
|
real(kind=wp), | intent(in), | dimension(2) | :: | yb | y-range of plot |
|
real(kind=wp), | intent(in), | dimension(2) | :: | zb | z-range of plot |
|
real(kind=wp), | intent(in), | optional | :: | altitude | Altitude angle of plot in degrees |
|
real(kind=wp), | intent(in), | optional | :: | azimuth | Azimuth angle of plot in degrees |
|
real(kind=wp), | intent(in), | optional | :: | zoom | Zoom ratio (default 1.0) |
Set the ticks for the axes
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | optional | :: | dx | Spacing between ticks on x-axis |
|
real(kind=wp), | intent(in), | optional | :: | dy | Spacing between ticks on y-axis |
|
logical, | intent(in), | optional | :: | logx | Flag for log-ticks and labels on x-axis |
|
logical, | intent(in), | optional | :: | logy | Flag for log-ticks and labels on y-axis |
|
character, | intent(in), | optional | :: | color | Color code for ticks, box, and labels |
|
real(kind=wp), | optional | :: | linewidth | Line width for ticks and box |
Set x,y and plot labels
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character, | intent(in) | :: | xLabel | Label for x-axis |
||
character, | intent(in) | :: | yLabel | Label for x-axis |
||
character, | intent(in) | :: | zLabel | Label for z-axis |
||
character, | intent(in), | optional | :: | color | Color of labels |
Set the ticks for the x-axis
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | optional | :: | d | Spacing between ticks |
|
logical, | intent(in), | optional | :: | logScale | Flag for log-ticks and labels |
|
logical, | intent(in), | optional | :: | primary | Draw primary axis |
|
logical, | intent(in), | optional | :: | secondary | Draw secondary axis |
|
character, | intent(in), | optional | :: | color | Color code for ticks, box, and labels |
|
real(kind=wp), | optional | :: | linewidth | Line width for ticks and box |
Set the ticks for the y-axis
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | optional | :: | d | Spacing between ticks |
|
logical, | intent(in), | optional | :: | logScale | Flag for log-ticks and labels |
|
logical, | intent(in), | optional | :: | primary | Draw primary axis |
|
logical, | intent(in), | optional | :: | secondary | Draw secondary axis |
|
character, | intent(in), | optional | :: | color | Color code for ticks, box, and labels |
|
real(kind=wp), | optional | :: | linewidth | Line width for ticks and box |
Set x,y and plot labels
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character, | intent(in) | :: | xLabel | Label for x-axis |
||
character, | intent(in) | :: | yLabel | Label for x-axis |
||
character, | intent(in) | :: | plotLabel | Label entire plot |
||
character, | intent(in), | optional | :: | color | Color of labels |
Set x-label
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character, | intent(in) | :: | label | Label for axis |
||
character, | intent(in), | optional | :: | color | Color of labels |
Set y-label
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character, | intent(in) | :: | label | Label for axis |
||
character, | intent(in), | optional | :: | color | Color of labels |
Set plot title
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character, | intent(in) | :: | label | Label for plot |
||
character, | intent(in), | optional | :: | color | Color of labels |
Add a colorbar to the top of the plot
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:, :) | :: | z | Data used for levels computation |
|
integer, | intent(in) | :: | N | Number of levels to compute |
||
character, | intent(in), | optional | :: | leftLabel | Label for left side of colorbar |
|
character, | intent(in), | optional | :: | rightLabel | Label for right side of colorbar |
Add a colorbar to the top of the plot
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:, :) | :: | z | Data used for levels computation |
|
integer, | intent(in) | :: | N | Number of levels to compute |
||
character, | intent(in), | optional | :: | leftLabel | Label for left side of colorbar |
|
character, | intent(in), | optional | :: | rightLabel | Label for right side of colorbar |
Create legend for plot data
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character, | intent(in) | :: | corner | Corner for legend |
||
character, | intent(in), | dimension(:, :) | :: | series | Data series in rows [name,textColor,lineStyle,lineColor,markStyle,markColor,boxColor] |
|
real(kind=wp), | intent(in), | optional | dimension(:) | :: | lineWidths | Line widths for the plots |
real(kind=wp), | intent(in), | optional | dimension(:) | :: | markScales | Marker sizes for the plots |
integer, | intent(in), | optional | dimension(:) | :: | markCounts | Marker counts for the plots |
integer, | intent(in), | optional | :: | ncol | Number of columns |
Create a histogram
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | d | Data for binning |
|
integer, | intent(in), | optional | :: | N | Number of bins |
|
real(kind=wp), | intent(in), | optional | dimension(2) | :: | db | Boundaries of bin range |
real(kind=wp), | intent(in), | optional | :: | relWidth | Relative width of bars (default 0.8) |
|
character, | intent(in), | optional | :: | fillColor | Color of bar fills |
|
character, | intent(in), | optional | :: | fillPattern | Pattern of bar fills |
|
character, | intent(in), | optional | :: | lineColor | Color of lines around bars |
|
real(kind=wp), | optional | :: | lineWidth | Width of lines around bars |
Create scatter plot of data
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-coordinates of data |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-coordinates of data |
|
real(kind=wp), | intent(in), | optional | dimension(:) | :: | c | Data for smooth coloring |
real(kind=wp), | intent(in), | optional | dimension(:) | :: | s | Data for marker scaling |
character, | intent(in), | optional | :: | markColor | Color of markers; overridden by z |
|
character, | intent(in), | optional | :: | markStyle | Style of markers |
|
real(kind=wp), | intent(in), | optional | :: | markSize | Size of markers |
Plot data using lines and or markers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-data for plot |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-data for plot |
|
character, | intent(in), | optional | :: | lineColor | Color of line |
|
character, | intent(in), | optional | :: | lineStyle | Style of line; '' for no line |
|
real(kind=wp), | intent(in), | optional | :: | lineWidth | Width of line |
|
character, | intent(in), | optional | :: | markColor | Color of markers, if any |
|
character, | intent(in), | optional | :: | markStyle | Style of markers; '' or absent for none |
|
real(kind=wp), | intent(in), | optional | :: | markSize | Size of markers, if any |
Plot data using lines and or markers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-data for plot |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-data for plot |
|
real(kind=wp), | intent(in), | dimension(:) | :: | z | z-data for plot |
|
character, | intent(in), | optional | :: | lineColor | Color of line |
|
character, | intent(in), | optional | :: | lineStyle | Style of line; '' for no line |
|
real(kind=wp), | intent(in), | optional | :: | lineWidth | Width of line |
|
character, | intent(in), | optional | :: | markColor | Color of markers, if any |
|
character, | intent(in), | optional | :: | markStyle | Style of markers; '' or absent for none |
|
real(kind=wp), | intent(in), | optional | :: | markSize | Size of markers, if any |
Plot contour lines
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-coordinates of data |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-coordinates of data |
|
real(kind=wp), | intent(in), | dimension(:, :) | :: | z | Data for contouring |
|
integer, | intent(in), | optional | :: | N | Number of levels to use in contour |
|
character, | intent(in), | optional | :: | lineColor | Color of contour lines |
|
character, | intent(in), | optional | :: | lineStyle | Style of contour lines |
|
real(kind=wp), | optional | :: | lineWidth | Width of contour lines |
Plot a 3d surface
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-coordinates of data |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-coordinates of data |
|
real(kind=wp), | intent(in), | dimension(:, :) | :: | z | Data for contouring |
|
integer, | intent(in), | optional | :: | N | Number of levels to use in surface colors |
|
character, | intent(in), | optional | :: | lineStyle | Style for xy lines ( '-' = on, '' = off ) |
Plot a 3d wireframe
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-coordinates of data |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-coordinates of data |
|
real(kind=wp), | intent(in), | dimension(:, :) | :: | z | Data for contouring |
|
character, | intent(in), | optional | :: | lineColor | Color of contour lines |
Plot filled contours
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-coordinates of data |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-coordinates of data |
|
real(kind=wp), | intent(in), | dimension(:, :) | :: | z | Data for contouring |
|
integer, | intent(in), | optional | :: | N | Number of levels to use in contour |
Plot vectors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-positions of vectors |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-positions of vectors |
|
real(kind=wp), | intent(in), | dimension(:, :) | :: | u | u-components of vectors |
|
real(kind=wp), | intent(in), | dimension(:, :) | :: | v | v-components of vectors |
|
real(kind=wp), | intent(in), | optional | dimension(:, :) | :: | s | Scale of vectors |
real(kind=wp), | intent(in), | optional | dimension(:, :) | :: | c | Color values for vectors |
real(kind=wp), | intent(in), | optional | :: | scaling | Scaling of vectors < 0 = Automatic, then scaled 0 = Automatic
|
|
character, | intent(in), | optional | :: | lineColor | Color of vectors |
|
character, | intent(in), | optional | :: | lineStyle | Style of vectors' lines |
|
real(kind=wp), | optional | :: | lineWidth | Width of vectors' lines |
Create a bar graph
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-positions of the bars' centers |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-positions of the bars' tops |
|
real(kind=wp), | intent(in), | optional | dimension(:) | :: | c | Color scale for bars |
real(kind=wp), | intent(in), | optional | :: | relWidth | Relative width of bars (default 0.8) |
|
character, | intent(in), | optional | :: | fillColor | Color of bar fills |
|
character, | intent(in), | optional | :: | fillPattern | Pattern of bar fills |
|
character, | intent(in), | optional | :: | lineColor | Color of lines around bars |
|
real(kind=wp), | optional | :: | lineWidth | Width of lines around bars |
Create a horizontal bar graph
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-positions of the bars' centers |
|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-positions of the bars' tops |
|
real(kind=wp), | intent(in), | optional | dimension(:) | :: | c | Color scale for bars |
real(kind=wp), | intent(in), | optional | :: | relWidth | Relative width of bars |
|
character, | intent(in), | optional | :: | fillColor | Color of bar fills |
|
character, | intent(in), | optional | :: | fillPattern | Pattern of bar fills |
|
character, | intent(in), | optional | :: | lineColor | Color of lines around bars |
|
real(kind=wp), | optional | :: | lineWidth | Width of lines around bars |
Fill space between two lines
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | ||
real(kind=wp), | intent(in), | dimension(:) | :: | y1 | ||
real(kind=wp), | intent(in), | optional | dimension(:) | :: | y0 | |
character, | intent(in), | optional | :: | fillColor | ||
character, | intent(in), | optional | :: | fillPattern | ||
real(kind=wp), | intent(in), | optional | :: | lineWidth |
Fill space between two lines
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | y | ||
real(kind=wp), | intent(in), | dimension(:) | :: | x1 | ||
real(kind=wp), | intent(in), | optional | dimension(:) | :: | x0 | |
character, | intent(in), | optional | :: | fillColor | ||
character, | intent(in), | optional | :: | fillPattern | ||
real(kind=wp), | intent(in), | optional | :: | lineWidth |
Plot error bars for a set of data points
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-data for plot |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-data for plot |
|
real(kind=wp), | intent(in), | optional | dimension(:) | :: | xerr | x-data error for plot |
real(kind=wp), | intent(in), | optional | dimension(:) | :: | yerr | y-data error for plot |
character, | intent(in), | optional | :: | lineColor | Color of line |
|
character, | intent(in), | optional | :: | lineStyle | Style of line; '' for no line |
|
real(kind=wp), | intent(in), | optional | :: | lineWidth | Width of line |
Setup PlPlot library, optionally overriding defaults
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character, | intent(in), | optional | :: | device | Output device to use
|
|
character, | intent(in), | optional | :: | fileName | Name of file(s) to write to The text |
|
real(kind=wp), | intent(in), | optional | :: | fontScaling | Font scaling relative to default value |
|
logical, | intent(in), | optional | :: | whiteOnBlack | Default foreground and background colors |
|
logical, | intent(in), | optional | :: | transparent | Transparent background |
|
character, | intent(in), | optional | :: | colormap | Colormap to use |
|
integer, | intent(in), | optional | dimension(2) | :: | figSize | Size of figures to produce in pixels |
Show the plots end finialize the PlPlot library