plplotlib_mod Module

module~~plplotlib_mod~~UsesGraph module~plplotlib_mod plplotlib_mod plplot plplot plplot->module~plplotlib_mod module~kinds_mod kinds_mod module~kinds_mod->module~plplotlib_mod module~array_mod array_mod module~kinds_mod->module~array_mod module~text_mod text_mod module~kinds_mod->module~text_mod module~time_mod time_mod module~kinds_mod->module~time_mod module~array_mod->module~plplotlib_mod module~text_mod->module~plplotlib_mod module~time_mod->module~text_mod iso_fortran_env iso_fortran_env iso_fortran_env->module~text_mod iso_c_binding iso_c_binding iso_c_binding->module~time_mod
Help

Wrapper module for plplot to give it a more matplotlib like personality

Used By

module~~plplotlib_mod~~UsedByGraph module~plplotlib_mod plplotlib_mod module~objective_mod objective_mod module~plplotlib_mod->module~objective_mod program~testeval_prg testEval_prg module~plplotlib_mod->program~testeval_prg program~logo_prg logo_prg module~plplotlib_mod->program~logo_prg program~basic_prg basic_prg module~plplotlib_mod->program~basic_prg program~testspline_prg testSpline_prg module~plplotlib_mod->program~testspline_prg program~examples_prg examples_prg module~plplotlib_mod->program~examples_prg program~testsparse_prg testSparse_prg module~plplotlib_mod->program~testsparse_prg program~animate_prg animate_prg module~plplotlib_mod->program~animate_prg program~testoptimize_prg testOptimize_prg module~objective_mod->program~testoptimize_prg
Help


Functions

public function binData(d, N, db, normalize) result(o)

Count data in each bin

Arguments

Type IntentOptional AttributesName
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)

Return Value real(kind=wp), dimension(:,:), allocatable


Subroutines

public subroutine figure()

Create a new figure

Arguments

None

public subroutine subplot(ny, nx, i, aspect, is3d)

Create a set of axes on a figure

Arguments

Type IntentOptional AttributesName
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

public subroutine xylim(xb, yb)

Set the x and y ranges of the plot

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(2):: xb

x-range of plot

real(kind=wp), intent(in), dimension(2):: yb

y-range of plot

public subroutine xlim(xl, xh)

Set the limits of the x-axis

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in) :: xl
real(kind=wp), intent(in) :: xh

public subroutine ylim(yl, yh)

Set the limits of the y-axis

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in) :: yl
real(kind=wp), intent(in) :: yh

public subroutine xyzlim(xb, yb, zb, altitude, azimuth, zoom)

Set the limits for a 3d plot

Arguments

Type IntentOptional AttributesName
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)

public subroutine ticks(dx, dy, logx, logy, color, linewidth)

Set the ticks for the axes

Arguments

Type IntentOptional AttributesName
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(len=*), intent(in), optional :: color

Color code for ticks, box, and labels

real(kind=wp), optional :: linewidth

Line width for ticks and box

public subroutine box(xLabel, yLabel, zLabel, color)

Set x,y and plot labels

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: xLabel

Label for x-axis

character(len=*), intent(in) :: yLabel

Label for x-axis

character(len=*), intent(in) :: zLabel

Label for z-axis

character(len=*), intent(in), optional :: color

Color of labels

public subroutine xticks(d, logScale, primary, secondary, color, linewidth)

Set the ticks for the x-axis

Arguments

Type IntentOptional AttributesName
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(len=*), intent(in), optional :: color

Color code for ticks, box, and labels

real(kind=wp), optional :: linewidth

Line width for ticks and box

public subroutine yticks(d, logScale, primary, secondary, color, linewidth)

Set the ticks for the y-axis

Arguments

Type IntentOptional AttributesName
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(len=*), intent(in), optional :: color

Color code for ticks, box, and labels

real(kind=wp), optional :: linewidth

Line width for ticks and box

public subroutine labels(xLabel, yLabel, plotLabel, color)

Set x,y and plot labels

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: xLabel

Label for x-axis

character(len=*), intent(in) :: yLabel

Label for x-axis

character(len=*), intent(in) :: plotLabel

Label entire plot

character(len=*), intent(in), optional :: color

Color of labels

public subroutine xlabel(label, color)

Set x-label

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: label

Label for axis

character(len=*), intent(in), optional :: color

Color of labels

public subroutine ylabel(label, color)

Set y-label

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: label

Label for axis

character(len=*), intent(in), optional :: color

Color of labels

public subroutine title(label, color)

Set plot title

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: label

Label for plot

character(len=*), intent(in), optional :: color

Color of labels

public subroutine colorbar(z, N, leftLabel, rightLabel)

Add a colorbar to the top of the plot

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(:,:):: z

Data used for levels computation

integer, intent(in) :: N

Number of levels to compute

character(len=*), intent(in), optional :: leftLabel

Label for left side of colorbar

character(len=*), intent(in), optional :: rightLabel

Label for right side of colorbar

public subroutine colorbar2(z, N, leftLabel, rightLabel)

Add a colorbar to the top of the plot

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(:,:):: z

Data used for levels computation

integer, intent(in) :: N

Number of levels to compute

character(len=*), intent(in), optional :: leftLabel

Label for left side of colorbar

character(len=*), intent(in), optional :: rightLabel

Label for right side of colorbar

public subroutine legend(corner, series, lineWidths, markScales, markCounts, ncol)

Create legend for plot data

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: corner

Corner for legend

character(len=*), 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

public subroutine hist(d, N, db, relWidth, fillColor, fillPattern, lineColor, lineWidth)

Create a histogram

Arguments

Type IntentOptional AttributesName
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(len=*), intent(in), optional :: fillColor

Color of bar fills

character(len=*), intent(in), optional :: fillPattern

Pattern of bar fills

character(len=*), intent(in), optional :: lineColor

Color of lines around bars

real(kind=wp), optional :: lineWidth

Width of lines around bars

public subroutine scatter(x, y, c, s, markColor, markStyle, markSize)

Create scatter plot of data

Arguments

Type IntentOptional AttributesName
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(len=*), intent(in), optional :: markColor

Color of markers; overridden by z

character(len=*), intent(in), optional :: markStyle

Style of markers

real(kind=wp), intent(in), optional :: markSize

Size of markers

public subroutine plot(x, y, lineColor, lineStyle, lineWidth, markColor, markStyle, markSize)

Plot data using lines and or markers

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(:):: x

x-data for plot

real(kind=wp), intent(in), dimension(:):: y

y-data for plot

character(len=*), intent(in), optional :: lineColor

Color of line

character(len=*), intent(in), optional :: lineStyle

Style of line; '' for no line

real(kind=wp), intent(in), optional :: lineWidth

Width of line

character(len=*), intent(in), optional :: markColor

Color of markers, if any

character(len=*), intent(in), optional :: markStyle

Style of markers; '' or absent for none

real(kind=wp), intent(in), optional :: markSize

Size of markers, if any

public subroutine plot3(x, y, z, lineColor, lineStyle, lineWidth, markColor, markStyle, markSize)

Plot data using lines and or markers

Arguments

Type IntentOptional AttributesName
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(len=*), intent(in), optional :: lineColor

Color of line

character(len=*), intent(in), optional :: lineStyle

Style of line; '' for no line

real(kind=wp), intent(in), optional :: lineWidth

Width of line

character(len=*), intent(in), optional :: markColor

Color of markers, if any

character(len=*), intent(in), optional :: markStyle

Style of markers; '' or absent for none

real(kind=wp), intent(in), optional :: markSize

Size of markers, if any

public subroutine contour(x, y, z, N, lineColor, lineStyle, lineWidth)

Plot contour lines

Arguments

Type IntentOptional AttributesName
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(len=*), intent(in), optional :: lineColor

Color of contour lines

character(len=*), intent(in), optional :: lineStyle

Style of contour lines

real(kind=wp), optional :: lineWidth

Width of contour lines

public subroutine surface(x, y, z, N, lineStyle)

Plot a 3d surface

Arguments

Type IntentOptional AttributesName
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(len=*), intent(in), optional :: lineStyle

Style for xy lines ( '-' = on, '' = off )

public subroutine wireframe(x, y, z, lineColor)

Plot a 3d wireframe

Arguments

Type IntentOptional AttributesName
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(len=*), intent(in), optional :: lineColor

Color of contour lines

public subroutine contourf(x, y, z, N)

Plot filled contours

Arguments

Type IntentOptional AttributesName
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

public subroutine quiver(x, y, u, v, s, c, scaling, lineColor, lineStyle, lineWidth)

Plot vectors

Arguments

Type IntentOptional AttributesName
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(len=*), intent(in), optional :: lineColor

Color of vectors

character(len=*), intent(in), optional :: lineStyle

Style of vectors' lines

real(kind=wp), optional :: lineWidth

Width of vectors' lines

public subroutine bar(x, y, c, relWidth, fillColor, fillPattern, lineColor, lineWidth)

Create a bar graph

Arguments

Type IntentOptional AttributesName
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(len=*), intent(in), optional :: fillColor

Color of bar fills

character(len=*), intent(in), optional :: fillPattern

Pattern of bar fills

character(len=*), intent(in), optional :: lineColor

Color of lines around bars

real(kind=wp), optional :: lineWidth

Width of lines around bars

public subroutine barh(y, x, c, relWidth, fillColor, fillPattern, lineColor, lineWidth)

Create a horizontal bar graph

Arguments

Type IntentOptional AttributesName
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(len=*), intent(in), optional :: fillColor

Color of bar fills

character(len=*), intent(in), optional :: fillPattern

Pattern of bar fills

character(len=*), intent(in), optional :: lineColor

Color of lines around bars

real(kind=wp), optional :: lineWidth

Width of lines around bars

public subroutine fillBetween(x, y1, y0, fillColor, fillPattern, lineWidth)

Fill space between two lines

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(:):: x
real(kind=wp), intent(in), dimension(:):: y1
real(kind=wp), intent(in), optional dimension(:):: y0
character(len=*), intent(in), optional :: fillColor
character(len=*), intent(in), optional :: fillPattern
real(kind=wp), intent(in), optional :: lineWidth

public subroutine fillBetweenx(y, x1, x0, fillColor, fillPattern, lineWidth)

Fill space between two lines

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(:):: y
real(kind=wp), intent(in), dimension(:):: x1
real(kind=wp), intent(in), optional dimension(:):: x0
character(len=*), intent(in), optional :: fillColor
character(len=*), intent(in), optional :: fillPattern
real(kind=wp), intent(in), optional :: lineWidth

public subroutine errorbar(x, y, xerr, yerr, lineColor, lineStyle, lineWidth)

Plot error bars for a set of data points

Arguments

Type IntentOptional AttributesName
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(len=*), intent(in), optional :: lineColor

Color of line

character(len=*), intent(in), optional :: lineStyle

Style of line; '' for no line

real(kind=wp), intent(in), optional :: lineWidth

Width of line

public subroutine setup(device, fileName, fontScaling, whiteOnBlack, transparent, colormap, figSize)

Setup PlPlot library, optionally overriding defaults

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in), optional :: device

Output device to use

character(len=*), intent(in), optional :: fileName

Name of file(s) to write to

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(len=*), intent(in), optional :: colormap

Colormap to use

integer, intent(in), optional dimension(2):: figSize

Size of figures to produce in pixels

public subroutine show()

Show the plots end finialize the PlPlot library

Arguments

None