plt

package
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

README

Gosl. plt. Plotting and drawing (png and eps)

go.dev reference

More information is available in the documentation of this package.

This package provides several functions to draw figures, plot results and annotate graphs. plt has been largelly based on matplotlib and is, currently, a wrapper to Python/pyplot by generating scripts to be run by an external os call.

Some basic functions are (similar to matplotlib ones to some extent):

  1. ReplaceAxes, Clf
  2. Hist, Plot, Text
  3. Show, Grid
  4. Contour, Quiver

The plt package has also some higher level functions such as:

  1. Arrow, Circle, Polyline
  2. AutoScale, AxisOff, AxisRange
  3. Camera, Cross (indicating the origin)
  4. SetScientificX, SetTicksX, SetTicksY, SetXlog, SetYlog
  5. Gll (grid-labels-legend)

Functions to draw and handle 3D graphs are also available:

  1. Plot3dLine, Plot3dPoint, Plot3dPoints
  2. Wireframe, Surface, Hemisphere, Superquadric
  3. AxisRange3d, CylinderZ, ConeZ

Nonetheless, interactive 3D graphs can also be developed with the vtk subpackage.

To initialise the figure, view and save a file (PNG or EPS), the following commands are available:

  1. Reset initialises drawing space (optional)
  2. Show show figure
  3. Save saves the figure, after creating a directory.

All functions take a pointer to a structure holding optional arguments, the A structure that belongs to the plt package, i.e. plt.A.

Examples

Drawing a polygon

Source code: ../examples/plt_polygon01.go

Polygon
Plotting a contour

Source code: ../examples/plt_contour01.go

Contour and vector field
Plotting with zoom window

Source code: ../examples/plt_zoomwindow01.go

Drawing a box and 3D points

Source code: ../examples/plt_boxandpoints.go

Waterfall graph

Source code: t_extra_test

Drawing slope indicators

Source code: t_extra_test

Output of Tests

Below, you will find some figures produced by the tests in t_plot01_test.go.

Test_plot01

Test_plot03

Test_plot04

Test_plot05

Test_plot06

Test_plot07

Test_plot08

Test_plot09

Documentation

Overview

Package plt contains functions for plotting, drawing in 2D or 3D, and generationg PNG and EPS files

Index

Constants

This section is empty.

Variables

View Source
var TemporaryDir = "/tmp/pltgosl.py"

TemporaryDir defines the default directory to save Python (matplotlib) files

Functions

func Annotate

func Annotate(x, y float64, txt string, args *A)

Annotate adds annotation to plot

func AnnotateXlabels

func AnnotateXlabels(x float64, txt string, args *A)

AnnotateXlabels sets text of xlabels

func Arc

func Arc(xc, yc, r, minAlpha, maxAlpha float64, args *A)

Arc adds arc to plot

minAlpha and maxAlpha are in degrees

func Arrow

func Arrow(xi, yi, xf, yf float64, args *A)

Arrow adds arrow to plot

styles:
  Curve           -        None
  CurveB          ->       head_length=0.4,head_width=0.2
  BracketB        -[       widthB=1.0,lengthB=0.2,angleB=None
  CurveFilledB    -|>      head_length=0.4,head_width=0.2
  CurveA          <-       head_length=0.4,head_width=0.2
  CurveAB         <->      head_length=0.4,head_width=0.2
  CurveFilledA    <|-      head_length=0.4,head_width=0.2
  CurveFilledAB   <|-|>    head_length=0.4,head_width=0.2
  BracketA        ]-       widthA=1.0,lengthA=0.2,angleA=None
  BracketAB       ]-[      widthA=1.0,lengthA=0.2,angleA=None,widthB=1.0,lengthB=0.2,angleB=None
  Fancy           fancy    head_length=0.4,head_width=0.4,tail_width=0.4
  Simple          simple   head_length=0.5,head_width=0.5,tail_width=0.2
  Wedge           wedge    tail_width=0.3,shrink_factor=0.5
  BarAB           |-|      widthA=1.0,angleA=None,widthB=1.0,angleB=None

func AutoScale

func AutoScale(P [][]float64)

AutoScale rescales plot area

func AxDist

func AxDist(dist float64)

AxDist sets distance in 3d graph. e.g. to avoid clipping due to tight bbox

func AxHline

func AxHline(y float64, args *A)

AxHline adds horizontal line to axis

func AxVline

func AxVline(x float64, args *A)

AxVline adds vertical line to axis

func AxisLims

func AxisLims(lims []float64)

AxisLims sets x and y limits

func AxisOff

func AxisOff()

AxisOff hides axes

func AxisRange

func AxisRange(xmin, xmax, ymin, ymax float64)

AxisRange sets x and y ranges (i.e. limits)

func AxisRange3d

func AxisRange3d(xmin, xmax, ymin, ymax, zmin, zmax float64)

AxisRange3d sets x, y, and z ranges (i.e. limits)

func AxisXmax

func AxisXmax(xmax float64)

AxisXmax sets maximum x

func AxisXmin

func AxisXmin(xmin float64)

AxisXmin sets minimum x

func AxisXrange

func AxisXrange(xmin, xmax float64)

AxisXrange sets x-range (i.e. limits)

func AxisYmax

func AxisYmax(ymax float64)

AxisYmax sets maximum y

func AxisYmin

func AxisYmin(ymin float64)

AxisYmin sets minimum y

func AxisYrange

func AxisYrange(ymin, ymax float64)

AxisYrange sets y-range (i.e. limits)

func Box

func Box(xmin, xmax, ymin, ymax, zmin, zmax float64, args *A)

Box draws box

NOTE: args.Wire and args.Ls are used to draw a wire around the edges of the box

func C added in v1.0.1

func C(i, palette int) string

C returns a color from a default palette

use palette < 0 for automatic color

func CalcDiagAngle

func CalcDiagAngle(p []float64) (alphaRad float64)

CalcDiagAngle computes the angle between a point and the diagonal of the 3d space

p -- point coordinates
returns the angle in radians

func Camera

func Camera(elev, azim float64, args *A)

Camera sets camera in 3d graph. Sets the elevation and azimuth of the axes.

elev -- is the elevation angle in the z plane
azim -- is the azimuth angle in the x,y plane

func Circle

func Circle(xc, yc, r float64, args *A)

Circle adds circle to plot

func Clf

func Clf()

Clf clears current figure

func ConeDiag

func ConeDiag(c []float64, alphaDeg float64, height float64, nu, nv int, args *A) (X, Y, Z [][]float64)

ConeDiag draws cone parallel to the diagonal of the 3d space

Input:
   c -- centre coordinates. may be nil
   alphaDeg -- half opening angle in degrees
   height -- height of cone; i.e. length along space diagonal
   nu -- number of divisions along the height of cone; e.g. 11
   nv -- number of divisions along circumference of cone; e.g. 21
 Output:
   X, Y, Z -- the coordinates of all points as in a meshgrid

func ConeZ

func ConeZ(c []float64, alphaDeg float64, height float64, nu, nv int, args *A) (X, Y, Z [][]float64)

ConeZ draws cone aligned with the z axis

Input:
   c -- centre coordinates. may be nil
   alphaDeg -- half opening angle in degrees
   height -- height of cone
   nu -- number of divisions along the height of cone; e.g. 11
   nv -- number of divisions along circumference of cone; e.g. 21
 Output:
   X, Y, Z -- the coordinates of all points as in a meshgrid

func ContourF

func ContourF(x, y, z [][]float64, args *A)

ContourF draws filled contour and possibly with a contour of lines (if args.UnoLines=false)

func ContourL

func ContourL(x, y, z [][]float64, args *A)

ContourL draws a contour with lines only

func Cross

func Cross(x0, y0 float64, args *A)

Cross adds a vertical and horizontal lines @ (x0,y0) to plot (i.e. large cross)

func CylinderZ

func CylinderZ(c []float64, radius, height float64, nu, nv int, args *A) (X, Y, Z [][]float64)

CylinderZ draws cylinder aligned with the z axis

Input:
   c -- centre coordinates. may be nil
   alphaDeg -- half opening angle in degrees
   height -- height of cone
   nu -- number of divisions along the height of cone; e.g. 11
   nv -- number of divisions along circumference of cone; e.g. 21
 Output:
   X, Y, Z -- the coordinates of all points as in a meshgrid

func Default3dView

func Default3dView(xmin, xmax, ymin, ymax, zmin, zmax float64, equal bool)

Default3dView sets default 3d view (camera and scale)

func DefaultTriad

func DefaultTriad(length float64)

DefaultTriad adds triad with default colors and labels

func Diag3d

func Diag3d(scale float64, args *A)

Diag3d draws diagonal of 3d space

func DoubleYscale

func DoubleYscale(ylabelOrEmpty string)

DoubleYscale duplicates y-scale

func Draw3dVector

func Draw3dVector(p, v []float64, sf float64, normed bool, args *A)

Draw3dVector adds segment to figure

p -- starting point
v -- vector
sf -- scale factor
normed -- normalised

func DrawArrow2d added in v1.1.0

func DrawArrow2d(c, v []float64, normalize bool, sf float64, args *A)

DrawArrow2d draws 2d arrow @ c with direction v

func DrawArrow3d added in v1.1.0

func DrawArrow3d(c, v []float64, normalize bool, sf float64, args *A)

DrawArrow3d draws 3d arrow @ c with direction v

func Equal

func Equal()

Equal sets same scale for both axes

func Gll

func Gll(xl, yl string, args *A)

Gll adds grid, labels, and legend to plot

func Grid

func Grid(args *A)

Grid adds grid to plot

func Grid2d

func Grid2d(X, Y [][]float64, withIDs bool, argsLines, argsIDs *A)

Grid2d draws grid lines of 2D grid

withIDs -- add text with IDs numbered by looping over {X,Y}[j][i] (j:outer, i:inner)

func Grid3d

func Grid3d(X, Y, Z [][][]float64, withIDs bool, argsLines *A, argsIDs *A)

Grid3d draws grid lines of 3D grid

withIDs -- add text with IDs numbered by looping over {X,Y,Z}[k][j][i] (k:outer, j:mid, i:inner)

func Grid3dZlevels added in v1.1.0

func Grid3dZlevels(X, Y [][]float64, Zlevels []float64, withIDs bool, argsLines, argsIDs *A)

Grid3dZlevels draws grid lines of 3D grid

withIDs -- add text with IDs numbered by looping over {X,Y,Z}[k][j][i] (k:outer, j:mid, i:inner)

func Hemisphere

func Hemisphere(c []float64, r, alphaMin, alphaMax float64, nu, nv int, cup bool, args *A) (X, Y, Z [][]float64)

Hemisphere draws Hemisphere

Input:
  c -- centre coordinates. may be nil
  r -- radius
  alphaMin -- minimum circumference angle (degrees)
  alphaMax -- minimum circumference angle (degrees)
  nu -- number of divisions along one direction on plane
  nv -- number of divisions along the orther direction on plane
  cup -- upside-down; like a cup
  surface -- generate surface
  wireframe -- generate wireframe
Output:
  X, Y, Z -- the coordinates of all points as in a meshgrid

func HideAllBorders

func HideAllBorders()

HideAllBorders hides all frame borders

func HideBorders

func HideBorders(args *A)

HideBorders hides frame borders

func HideTRborders

func HideTRborders()

HideTRborders hides top and right borders

func Hist

func Hist(x [][]float64, labels []string, args *A)

Hist draws histogram

func Legend

func Legend(args *A)

Legend adds legend to plot

func LegendX

func LegendX(dat []*A, args *A)

LegendX adds legend to plot with given data instead of relying on labels

func M added in v1.0.1

func M(i, scheme int) string

M returns a marker

use scheme < 0 for no marker

func PlaneZ

func PlaneZ(p, n []float64, xmin, xmax, ymin, ymax float64, nu, nv int, showPN bool, args *A) (X, Y, Z [][]float64)

PlaneZ draws a plane that has a normal vector with non-zero z component. The plane may be perpendicular to z.

Input:
   p -- point on plane
   n -- normal vector
   nu -- number of divisions along one direction on plane
   nv -- number of divisions along the orther direction on plane
   showPN -- show point and normal
 Output:
   X, Y, Z -- the coordinates of all points as in a meshgrid

func Plot

func Plot(x, y []float64, args *A) (sx, sy string)

Plot plots x-y series

func Plot3dLine

func Plot3dLine(X, Y, Z []float64, args *A)

Plot3dLine plots 3d line

func Plot3dPoint

func Plot3dPoint(x, y, z float64, args *A)

Plot3dPoint plot 3d point

func Plot3dPoints

func Plot3dPoints(X, Y, Z []float64, args *A)

Plot3dPoints plots 3d points

func PlotOne

func PlotOne(x, y float64, args *A)

PlotOne plots one point @ (x,y)

func Polygon3d

func Polygon3d(P [][]float64, args *A)

Polygon3d draws a polygon in 3D. P[npts][3]

func Polyline

func Polyline(P [][]float64, args *A)

Polyline draws a polyline. P[npts][2]

func PyCmds

func PyCmds(text string)

PyCmds adds Python commands to be called when plotting

func PyFile

func PyFile(filename string)

PyFile loads Python file and copy its contents to temporary buffer

func Quiver

func Quiver(x, y, gx, gy [][]float64, args *A)

Quiver draws vector field

func ReplaceAxes

func ReplaceAxes(xi, yi, xf, yf, xDel, yDel float64, xLab, yLab string, argsArrow, argsText *A)

ReplaceAxes substitutes axis frame (see Axes in gosl.py)

ex: xDel, yDel := 0.04, 0.04

func Reset

func Reset(setDefault bool, args *A)

Reset resets drawing buffer (i.e. Python temporary file data) and sets figure data.

NOTE: This function is optional; i.e. plt works without calling this function.
      Nonetheless, if fontsizes or figure sizes need to be specified, Reset can be called.

Input:
  setDefault -- sets default values
  args -- optional data (may be nil)

NOTE: Default values are selected if setDefault == true.
      Otherwise, Python (matplotlib) will choose defaults.
      Also, if args != nil, some values are set based on data in args.

The following data is set:
  fontsizes:
     args.Fsz     float64 // font size
     args.FszLbl  float64 // font size of labels
     args.FszLeg  float64 // font size of legend
     args.FszXtck float64 // font size of x-ticks
     args.FszYtck float64 // font size of y-ticks
  figure data:
     args.Dpi     int     // dpi to be used when saving figure. default = 96
     args.Png     bool    // save png file
     args.Eps     bool    // save eps file
     args.Prop    float64 // proportion: height = width * prop
     args.WidthPt float64 // width in points. Get this from LaTeX using \showthe\columnwidth

func Save

func Save(dirout, fnkey string)

Save saves figure after creating a directory

NOTE: the file name will be fnkey + .png (default) or .eps depending on the Reset function

func Sca

func Sca(axName string)

Sca sets current axes

func Scale3d

func Scale3d(xmin, xmax, ymin, ymax, zmin, zmax float64, equal bool)

Scale3d scales 3d axes

func SetAxis

func SetAxis(xmin, xmax, ymin, ymax float64)

SetAxis sets axes limits

func SetFontSizes

func SetFontSizes(args *A)

SetFontSizes sets font sizes

NOTE: this function also sets the FontSet, if not ""

func SetHspace

func SetHspace(hspace float64)

SetHspace sets horizontal space between subplots

func SetLabels

func SetLabels(x, y string, args *A)

SetLabels sets x-y axes labels

func SetLabels3d

func SetLabels3d(x, y, z string, args *A)

SetLabels3d sets x-y-z axes labels

func SetNoXtickLabels added in v1.0.1

func SetNoXtickLabels()

SetNoXtickLabels hides labels of x-ticks but keep ticks

func SetNoYtickLabels added in v1.0.1

func SetNoYtickLabels()

SetNoYtickLabels hides labels of y-ticks but keep ticks

func SetScientificX

func SetScientificX(minOrder, maxOrder int)

SetScientificX sets scientific notation for ticks along x-axis

func SetScientificY

func SetScientificY(minOrder, maxOrder int)

SetScientificY sets scientific notation for ticks along y-axis

func SetTicksNormal

func SetTicksNormal()

SetTicksNormal sets normal ticks

func SetTicksRotationX

func SetTicksRotationX(degree float64)

SetTicksRotationX sets the rotation angle of x-ticks

func SetTicksRotationY

func SetTicksRotationY(degree float64)

SetTicksRotationY sets the rotation angle of y-ticks

func SetTicksX

func SetTicksX(majorEvery, minorEvery float64, majorFmt string)

SetTicksX sets ticks along x

func SetTicksXlist

func SetTicksXlist(values []float64)

SetTicksXlist sets x-axis ticks with given list

func SetTicksY

func SetTicksY(majorEvery, minorEvery float64, majorFmt string)

SetTicksY sets ticks along y

func SetTicksYlist

func SetTicksYlist(values []float64)

SetTicksYlist sets y-ayis ticks with given list

func SetVspace

func SetVspace(vspace float64)

SetVspace sets vertical space between subplots

func SetXlabel added in v1.0.1

func SetXlabel(xl string, args *A)

SetXlabel sets x-label

func SetXlog

func SetXlog()

SetXlog sets x-scale to be log

func SetXnticks

func SetXnticks(num int)

SetXnticks sets number of ticks along x

func SetYlabel added in v1.0.1

func SetYlabel(yl string, args *A)

SetYlabel sets y-label

func SetYlog

func SetYlog()

SetYlog sets y-scale to be log

func SetYnticks

func SetYnticks(num int)

SetYnticks sets number of ticks along y

func Show

func Show()

Show shows figure

func ShowSave

func ShowSave(dirout, fnkey string)

ShowSave shows figure and/or save figure

func SlopeInd added in v1.0.1

func SlopeInd(m, xc, yc, xlen float64, lbl string, flip, xlog, ylog bool, args, argsLbl *A)

SlopeInd draws indicator of line slope

func Sphere added in v1.0.1

func Sphere(c []float64, radius float64, nalp, neta int, args *A) (X, Y, Z [][]float64)

Sphere draws sphere

Input:
  c    -- centre coordinates. may be nil => (0,0,0) will be considered
  r    -- radius
  nalp -- number of divisions along α
  neta -- number of divisions along η
Output:
  X, Y, Z -- the coordinates of all points as in a meshgrid

func SplotGap

func SplotGap(w, h float64)

SplotGap sets gap between subplots

func Subplot

func Subplot(i, j, k int)

Subplot adds/sets a subplot

func SubplotI

func SubplotI(I []int)

SubplotI adds/sets a subplot with given indices in I

func SubplotMatrix added in v1.0.1

func SubplotMatrix(nrow, ncol int, cmds func(i, j int))

SubplotMatrix call plotCommands to fill a matrix of plots

Input:
  nrow -- number of rows in matrix [must be at least 1]
  ncol -- number of columns in matrix [must be at least 1]
  cmds -- plotting commants for each (i,j) grid point (NOT Subplot indices)

func SubplotMatrixSym added in v1.0.1

func SubplotMatrixSym(nrow, ncol int, cmds func(i, j int), corner func()) (n, cornerIdx int)

SubplotMatrixSym call plotCommands to fill a symmetric matrix of plots (excluding the diagonal)

Input:
  nrow   -- number of rows in matrix including diagonal [must be at least 2]
  ncol   -- number of columns in matrix  including diagonal[must be at least 2]
  cmds   -- plotting commants for each (i,j) grid point (NOT Subplot indices)
  corner -- function to be called to draw on "corner" of matrix (left-bottom side)
Output:
  n -- the effective number of columns == min(nrow-1,ncol-1)
  cornerIdx -- the subplot index of "corner" graph
  NOTE: the resulting grid will be (n×n)

func SupTitle

func SupTitle(txt string, args *A)

SupTitle sets subplot title

func Superquadric

func Superquadric(c, r, a []float64, alpMin, alpMax, etaMin, etaMax float64, nalp, neta int, args *A) (X, Y, Z [][]float64)

Superquadric draws superquadric (i.e. superellipsoid)

Input:
  c      -- centre coordinates. may be nil => (0,0,0) will be considered
  r      -- radii [3]
  a      -- exponents [3]
  alpMin -- min alp angle. in [-180, 180) degrees
  alpMax -- max alp angle. in (-180, 180] degrees
  etaMin -- min eta angle. in [-90, 90) degrees
  etaMax -- max eta angle. in (-90, 90] degrees
  nalp   -- number of divisions along α
  neta   -- number of divisions along η
Output:
  X, Y, Z -- the coordinates of all points as in a meshgrid

func Surface

func Surface(X, Y, Z [][]float64, args *A)

Surface draws surface

func TexPiRadFmt

func TexPiRadFmt(x float64) string

TexPiRadFmt formats number in radians/pi notation

func Text

func Text(x, y float64, txt string, args *A)

Text adds text to plot

func Text3d

func Text3d(x, y, z float64, txt string, args *A)

Text3d adds text to 3d plot

func Title

func Title(txt string, args *A)

Title sets title

func Triad

func Triad(length float64, xLab, yLab, zLab string, argsLines, argsText *A)

Triad draws icon indicating x-y-z origin and direction

xLab, yLab, zLab -- labels. may be empty

func Waterfall added in v1.0.1

func Waterfall(X, T []float64, Z [][]float64, args *A)

Waterfall draws parallel lines @ t along x with height = z. z[len(t)][len(x)]

func Wireframe

func Wireframe(X, Y, Z [][]float64, args *A)

Wireframe draws wireframe

func ZoomWindow

func ZoomWindow(lef, bot, wid, hei float64, args *A) (axOld, axNew string)

ZoomWindow adds another axes to plot a figure within the figure; e.g. a zoom window

lef, bot, wid, hei -- normalised figure coordinates: left,bottom,width,height
asOld -- handle to the previous axes
axNew -- handle to the new axes

Types

type A

type A struct {

	// plot and basic options
	C      string  // color
	A      float64 // transparency coefficient
	M      string  // marker
	Ls     string  // linestyle
	Lw     float64 // linewidth; -1 => default
	Ms     int     // marker size; -1 => default
	L      string  // label
	Me     int     // mark-every; -1 => default
	Z      int     // z-order
	Mec    string  // marker edge color
	Mew    float64 // marker edge width
	Void   bool    // void marker => markeredgecolor='C', markerfacecolor='none'
	NoClip bool    // turn clipping off

	// shapes
	Fc     string  // shapes: face color
	Ec     string  // shapes: edge color
	Scale  float64 // shapes: scale information
	Style  string  // shapes: style information
	Closed bool    // shapes: closed shape

	// text and extra arguments
	Ha      string  // horizontal alignment; e.g. 'center'
	Va      string  // vertical alignment; e.g. 'center'
	Rot     float64 // rotation
	Fsz     float64 // font size
	FszLbl  float64 // font size of labels
	FszLeg  float64 // font size of legend
	FszXtck float64 // font size of x-ticks
	FszYtck float64 // font size of y-ticks
	FontSet string  // font set: e.g. 'stix', 'stixsans' [default]
	HideL   bool    // hide left frame border
	HideR   bool    // hide right frame border
	HideB   bool    // hide bottom frame border
	HideT   bool    // hide top frame border

	// other options
	AxCoords  bool // the given x-y coordinates correspond to axes coords
	FigCoords bool // the given x-y coordinates correspond to figure coords

	// legend
	LegLoc   string    // legend: location. e.g.: right, center left, upper right, lower right, best, center, lower left, center right, upper left, upper center, lower center
	LegNcol  int       // legend: number of columns
	LegHlen  float64   // legend: handle length
	LegFrame bool      // legend: frame on
	LegOut   bool      // legend: outside
	LegOutX  []float64 // legend: normalised coordinates to put legend outside frame

	// colors for contours or histograms
	Colors []string // contour or histogram: colors

	// contours
	Nlevels  int       // contour: number of levels (overridden by Levels when it's not nil)
	Levels   []float64 // contour: levels (may be nil)
	CmapIdx  int       // contour: colormap index
	NumFmt   string    // contour: number format; e.g. "%g" or "%.2f"
	NoLines  bool      // contour: do not add lines on top of filled contour
	NoLabels bool      // contour: do not add labels
	NoInline bool      // contour: do not draw labels 'inline'
	NoCbar   bool      // contour: do not add colorbar
	CbarLbl  string    // contour: colorbar label
	SelectV  float64   // contour: selected value
	SelectC  string    // contour: color to mark selected level. empty means no selected line
	SelectLw float64   // contour: zero level linewidth

	// 3d graphs
	Rstride int  // 3d: row stride
	Cstride int  // 3d: column stride
	Surf    bool // 3d: generate surface
	Wire    bool // 3d: generate wireframe

	// histograms
	Type    string // histogram: type; e.g. "bar"
	Stacked bool   // histogram: stacked
	NoFill  bool   // histogram: do not fill bars
	Nbins   int    // histogram: number of bins
	Normed  bool   // histogram: normed

	// figures
	Dpi     int     // figure: dpi to be used when saving figure. default = 96
	Png     bool    // figure: save png file
	Eps     bool    // figure: save eps file
	Prop    float64 // figure: proportion: height = width * prop
	WidthPt float64 // figure: width in points. Get this from LaTeX using \showthe\columnwidth
}

The A structure holds arguments to configure plots, including style data for shapes (e.g. polygons)

func (A) String

func (o A) String(forHistogram, for3dPoints bool) (l string)

String returns a string representation of arguments

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL