References

Contents

Index

Public Interface

Plot specification

RecipesBase.plotFunction

The main plot command. Use plot to create a new plot object, and plot! to add to an existing one:

    plot(args...; kw...)                  # creates a new plot window, and sets it to be the current
    plot!(args...; kw...)                 # adds to the `current`
    plot!(plotobj, args...; kw...)        # adds to the plot `plotobj`

There are lots of ways to pass in data, and lots of keyword arguments... just try it and it will likely work as expected. When you pass in matrices, it splits by columns. To see the list of available attributes, use the plotattr(attr) function, where attr is the symbol :Series, :Subplot, :Plot, or :Axis. Pass any attribute to plotattr as a String to look up its docstring, e.g., plotattr("seriestype").

Plots.bboxFunction
bbox(x, y, w, h [,originargs...])
bbox(layout)

Create a bounding box for plotting

RecipesBase.gridFunction
grid(args...; kw...)

Create a grid layout for subplots. args specify the dimensions, e.g. grid(3,2, widths = (0.6,0.4)) creates a grid with three rows and two columns of different width.

Missing docstring.

Missing docstring for @layout. Check Documenter's build log for details.

Plots.defaultFunction

default(key) returns the current default value for that key.

default(key, value) sets the current default value for that key.

default(; kw...) will set the current default value for each key/value pair.

default(plotattributes, key) returns the key from plotattributes if it exists, otherwise default(key).

Plots.themeFunction
theme(s::Symbol)

Specify the colour theme for plots.

Plots.withFunction

Allows temporary setting of backend and defaults for Plots. Settings apply only for the do block. Example:

with(:gr, size=(400,400), type=:histogram) do
  plot(rand(10))
  plot(rand(10))
end
Plots.arrowMethod
arrow(args...)

Define arrowheads to apply to lines - args are style (:open or :closed), side (:head, :tail or :both), headlength and headwidth

Plots.coordsMethod

return the vertex points from a Shape or Segments object

Plots.fontMethod
font(args...)

Create a Font from a list of features. Values may be specified either as arguments (which are distinguished by type/value) or as keyword arguments.

Arguments

  • family: AbstractString. "serif" or "sans-serif" or "monospace"
  • pointsize: Integer. Size of font in points
  • halign: Symbol. Horizontal alignment (:hcenter, :left, or :right)
  • valign: Symbol. Vertical aligment (:vcenter, :top, or :bottom)
  • rotation: Real. Angle of rotation for text in degrees (use a non-integer type)
  • color: Colorant or Symbol

Examples

julia> font(8)
julia> font(family="serif", halign=:center, rotation=45.0)
Plots.makeshapeMethod

create a shape by picking points around the unit circle. n is the number of point/sides, offset is the starting angle

Plots.makestarMethod

create a star by weaving together points from an outer and inner circle. n is the number of arms

Plots.scaleFunction
scale(shape, x, y = x, c = center(shape))
scale!(shape, x, y = x, c = center(shape))

Scale shape by a factor.

Plots.scalefontsizesMethod
scalefontsizes(factor::Number)

Scales all current font sizes by factor. For example scalefontsizes(1.1) increases all current font sizes by 10%. To reset to initial sizes, use scalefontsizes()

Plots.strokeMethod
stroke(args...; alpha = nothing)

Define the properties of the stroke used in plotting lines

Plots.textMethod
text(string, args...; kw...)

Create a PlotText object wrapping a string with font info, for plot annotations. args and kw are passed to font.

Plots.translateFunction
translate(shape, x, y = x)
translate!(shape, x, y = x)

Translate a Shape in space.

Plots.weaveMethod

interleave 2 vectors into each other (like a zipper's teeth)

Plots.abline!Function

abline!([plot,] a, b; kwargs...)

Adds ax+b... straight line over the current plot, without changing the axis limits

Plots.annotate!Method
annotate!(anns...)

Add annotations to an existing plot.

Arguments

  • anns: An AbstractVector of tuples of the form (x,y,text). The text object can be a String, PlotText PlotText (created with text(args...)), or a tuple of arguments to text (e.g., ("Label", 8, :red, :top)).

Example

julia> plot(1:10)
julia> annotate!([(7,3,"(7,3)"),(3,7,text("hey", 14, :left, :top, :green))])
julia> annotate!([(4, 4, ("More text", 8, 45.0, :bottom, :red))])
Plots.areaplotFunction
areaplot([x,] y)
areaplot!([x,] y)

Draw a stacked area plot of the matrix y.

Examples

julia> areaplot(1:3, [1 2 3; 7 8 9; 4 5 6], seriescolor = [:red :green :blue], fillalpha = [0.2 0.3 0.4])
Plots.bar!Method
bar(x,y)
bar!(x,y)

Make a bar plot of y vs x.

Arguments

  • bar_position: Symbol. Choose from :overlay (default), :stack. (warning: May not be implemented fully)
  • bar_width: nothing or Number. Width of bars in data coordinates. When nothing, chooses based on x (or y when orientation = :h).
  • bar_edges: Bool. Align bars to edges (true), or centers (the default)?
  • orientation: Symbol. (deprecated) Horizontal or vertical orientation for bar types. Values :h, :hor, :horizontal correspond to horizontal (sideways, anchored to y-axis), and :v, :vert, and :vertical correspond to vertical (the default).

Examples

julia> bar([1,2,3],[4,5,6],fillcolor=[:red,:green,:blue],fillalpha=[0.2,0.4,0.6])
julia> bar([(1,4),(2,5),(3,6)])
Plots.barMethod
bar(x,y)
bar!(x,y)

Make a bar plot of y vs x.

Arguments

  • bar_position: Symbol. Choose from :overlay (default), :stack. (warning: May not be implemented fully)
  • bar_width: nothing or Number. Width of bars in data coordinates. When nothing, chooses based on x (or y when orientation = :h).
  • bar_edges: Bool. Align bars to edges (true), or centers (the default)?
  • orientation: Symbol. (deprecated) Horizontal or vertical orientation for bar types. Values :h, :hor, :horizontal correspond to horizontal (sideways, anchored to y-axis), and :v, :vert, and :vertical correspond to vertical (the default).

Examples

julia> bar([1,2,3],[4,5,6],fillcolor=[:red,:green,:blue],fillalpha=[0.2,0.4,0.6])
julia> bar([(1,4),(2,5),(3,6)])
Plots.barhist!Method
barhist(x)
barhist!(x)

Make a histogram bar plot. See histogram.

Plots.barhistMethod
barhist(x)
barhist!(x)

Make a histogram bar plot. See histogram.

Plots.boxplot!Method
boxplot(x, y)
boxplot!(x, y)

Make a box and whisker plot.

Keyword arguments

  • notch: Bool. Notch the box plot? (false)
  • whisker_range: Real. Whiskers extend whisker_range*IQR below the first quartile and above the third quartile. Values outside this range are shown as outliers (1.5)
  • outliers: Bool. Show outliers? (true)
  • whisker_width: Real or Symbol. Length of whiskers; the options are :match to match the box width, :half, or a number to indicate the total length. (:half)

Example

julia> using StatsPlots
julia> boxplot(repeat([1,2,3],outer=100),randn(300))
Plots.boxplotMethod
boxplot(x, y)
boxplot!(x, y)

Make a box and whisker plot.

Keyword arguments

  • notch: Bool. Notch the box plot? (false)
  • whisker_range: Real. Whiskers extend whisker_range*IQR below the first quartile and above the third quartile. Values outside this range are shown as outliers (1.5)
  • outliers: Bool. Show outliers? (true)
  • whisker_width: Real or Symbol. Length of whiskers; the options are :match to match the box width, :half, or a number to indicate the total length. (:half)

Example

julia> using StatsPlots
julia> boxplot(repeat([1,2,3],outer=100),randn(300))
Plots.contour!Method
contour(x,y,z)
contour!(x,y,z)

Draw contour lines of the Surface z.

Arguments

  • levels: Contour levels (if AbstractVector) or number of levels (if Integer)
  • fill: Bool. Fill area between contours or draw contours only (false by default)

Example

julia> x = y = range(-20, stop = 20, length = 100)
julia> contour(x, y, (x, y) -> x^2 + y^2)
Plots.contourMethod
contour(x,y,z)
contour!(x,y,z)

Draw contour lines of the Surface z.

Arguments

  • levels: Contour levels (if AbstractVector) or number of levels (if Integer)
  • fill: Bool. Fill area between contours or draw contours only (false by default)

Example

julia> x = y = range(-20, stop = 20, length = 100)
julia> contour(x, y, (x, y) -> x^2 + y^2)
Plots.curves!Method
curves(x,y)
curves!(x,y)

Draw a Bezier curve from (x[1],y[1]) to (x[end],y[end]) with control points (x[2],y[2]), ..., (x[end-1],y[end]-1)

Example

julia> curves([1,2,3,4],[1,1,2,4])
Plots.curvesMethod
curves(x,y)
curves!(x,y)

Draw a Bezier curve from (x[1],y[1]) to (x[end],y[end]) with control points (x[2],y[2]), ..., (x[end-1],y[end]-1)

Example

julia> curves([1,2,3,4],[1,1,2,4])
Plots.density!Method
density(x)
density!(x)

Make a line plot of a kernel density estimate of x.

Arguments

  • x: AbstractVector of samples for probability density estimation

Example

julia> using StatsPlots
julia> density(randn(100_000))
Plots.densityMethod
density(x)
density!(x)

Make a line plot of a kernel density estimate of x.

Arguments

  • x: AbstractVector of samples for probability density estimation

Example

julia> using StatsPlots
julia> density(randn(100_000))
Plots.heatmap!Method
heatmap(x,y,z)
heatmap!(x,y,z)

Plot a heatmap of the rectangular array z.

Example

julia> heatmap(randn(10,10))
Plots.heatmapMethod
heatmap(x,y,z)
heatmap!(x,y,z)

Plot a heatmap of the rectangular array z.

Example

julia> heatmap(randn(10,10))
Plots.hexbin!Method
hexbin(x,y)
hexbin!(x,y)

Make a hexagonal binning plot (a histogram of the observations (x[i],y[i]) with hexagonal bins)

Example

julia> hexbin(randn(10_000), randn(10_000))
Plots.hexbinMethod
hexbin(x,y)
hexbin!(x,y)

Make a hexagonal binning plot (a histogram of the observations (x[i],y[i]) with hexagonal bins)

Example

julia> hexbin(randn(10_000), randn(10_000))
Plots.histogram!Method
histogram(x)
histogram!(x)

Plot a histogram.

Arguments

  • x: AbstractVector of values to be binned
  • bins: Integer, NTuple{2,Integer}, AbstractVector or Symbol. Default is :auto (the Freedman-Diaconis rule). For histogram-types, defines the approximate number of bins to aim for, or the auto-binning algorithm to use (:sturges, :sqrt, :rice, :scott or :fd). For fine-grained control pass a Vector of break values, e.g. range(minimum(x), stop = maximum(x), length = 25)
  • weights: Vector of weights for the values in x, for weighted bin counts
  • normalize: Bool or Symbol. Histogram normalization mode. Possible values are: false/:none (no normalization, default), true/:pdf (normalize to a discrete Probability Density Function, where the total area of the bins is 1), :probability (bin heights sum to 1) and :density (the area of each bin, rather than the height, is equal to the counts - useful for uneven bin sizes).
  • bar_position: Symbol. Choose from :overlay (default), :stack. (warning: May not be implemented fully)
  • bar_width: nothing or Number. Width of bars in data coordinates. When nothing, chooses based on x (or y when orientation = :h).
  • bar_edges: Bool. Align bars to edges (true), or centers (the default)?
  • orientation: Symbol. (deprecated) Horizontal or vertical orientation for bar types. Values :h, :hor, :horizontal correspond to horizontal (sideways, anchored to y-axis), and :v, :vert, and :vertical correspond to vertical (the default).

Example

julia> histogram([1,2,1,1,4,3,8],bins=0:8)
julia> histogram([1,2,1,1,4,3,8],bins=0:8,weights=weights([4,7,3,9,12,2,6]))
Plots.histogramMethod
histogram(x)
histogram!(x)

Plot a histogram.

Arguments

  • x: AbstractVector of values to be binned
  • bins: Integer, NTuple{2,Integer}, AbstractVector or Symbol. Default is :auto (the Freedman-Diaconis rule). For histogram-types, defines the approximate number of bins to aim for, or the auto-binning algorithm to use (:sturges, :sqrt, :rice, :scott or :fd). For fine-grained control pass a Vector of break values, e.g. range(minimum(x), stop = maximum(x), length = 25)
  • weights: Vector of weights for the values in x, for weighted bin counts
  • normalize: Bool or Symbol. Histogram normalization mode. Possible values are: false/:none (no normalization, default), true/:pdf (normalize to a discrete Probability Density Function, where the total area of the bins is 1), :probability (bin heights sum to 1) and :density (the area of each bin, rather than the height, is equal to the counts - useful for uneven bin sizes).
  • bar_position: Symbol. Choose from :overlay (default), :stack. (warning: May not be implemented fully)
  • bar_width: nothing or Number. Width of bars in data coordinates. When nothing, chooses based on x (or y when orientation = :h).
  • bar_edges: Bool. Align bars to edges (true), or centers (the default)?
  • orientation: Symbol. (deprecated) Horizontal or vertical orientation for bar types. Values :h, :hor, :horizontal correspond to horizontal (sideways, anchored to y-axis), and :v, :vert, and :vertical correspond to vertical (the default).

Example

julia> histogram([1,2,1,1,4,3,8],bins=0:8)
julia> histogram([1,2,1,1,4,3,8],bins=0:8,weights=weights([4,7,3,9,12,2,6]))
Plots.histogram2d!Method
histogram2d(x,y)
histogram2d!(x,y)

Plot a two-dimensional histogram.

Arguments

  • bins: Number of bins (if an Integer) or bin edges (if an AbtractVector)
  • weights: Vector of weights for the values in x. Each entry of x contributes its weight to the height of its bin.

Example

julia> histogram2d(randn(10_000),randn(10_000))
Plots.histogram2dMethod
histogram2d(x,y)
histogram2d!(x,y)

Plot a two-dimensional histogram.

Arguments

  • bins: Number of bins (if an Integer) or bin edges (if an AbtractVector)
  • weights: Vector of weights for the values in x. Each entry of x contributes its weight to the height of its bin.

Example

julia> histogram2d(randn(10_000),randn(10_000))
Plots.hline!Method
hline(y)
hline!(y)

Draw horizontal lines at positions specified by the values in the AbstractVector y

Example

julia> hline([-1,0,2])
Plots.hlineMethod
hline(y)
hline!(y)

Draw horizontal lines at positions specified by the values in the AbstractVector y

Example

julia> hline([-1,0,2])
Plots.hspan!Method
hspan(y)

Draw a rectangle between the horizontal line at position y[1] and the horizontal line at position y[2]. If length(y) ≥ 4, then further rectangles are drawn between y[3] and y[4], y[5] and y[6], and so on. If length(y) is odd, then the last entry of y is ignored.

Example

julia> hspan(1:6)
Plots.hspanMethod
hspan(y)

Draw a rectangle between the horizontal line at position y[1] and the horizontal line at position y[2]. If length(y) ≥ 4, then further rectangles are drawn between y[3] and y[4], y[5] and y[6], and so on. If length(y) is odd, then the last entry of y is ignored.

Example

julia> hspan(1:6)
Plots.lens!Function
lens!([plot,] x, y, inset = (sp_index, bbox(x1, x2, y1, y2)))

Magnify a region of a plot given by x and y. sp_index is the index of the subplot and x1, x2, y1 and y2 should be between 0 and 1.

Plots.mesh3d!Method
mesh3d(x,y,z)
mesh3d(x,y,z; connections)

Plot a 3d mesh. On Plotly the triangles can be specified using the connections argument.

Example

x=[0, 1, 2, 0]
y=[0, 0, 1, 2]
z=[0, 2, 0, 1]

i=[0, 0, 0, 1]
j=[1, 2, 3, 2]
k=[2, 3, 1, 3]

plot(x,y,z,seriestype=:mesh3d;connections=(i,j,k))
Plots.mesh3dMethod
mesh3d(x,y,z)
mesh3d(x,y,z; connections)

Plot a 3d mesh. On Plotly the triangles can be specified using the connections argument.

Example

x=[0, 1, 2, 0]
y=[0, 0, 1, 2]
z=[0, 2, 0, 1]

i=[0, 0, 0, 1]
j=[1, 2, 3, 2]
k=[2, 3, 1, 3]

plot(x,y,z,seriestype=:mesh3d;connections=(i,j,k))
Plots.ohlc!Method
ohlc(x,y::Vector{OHLC})
ohlc!(x,y::Vector{OHLC})

Make open-high-low-close plot. Each entry of y is represented by a vertical segment extending from the low value to the high value, with short horizontal segments on the left and right indicating the open and close values, respectively.

Example

julia> meanprices = cumsum(randn(100))
julia> y = OHLC[(p+rand(),p+1,p-1,p+rand()) for p in meanprices]
julia> ohlc(y)
Plots.ohlcMethod
ohlc(x,y::Vector{OHLC})
ohlc!(x,y::Vector{OHLC})

Make open-high-low-close plot. Each entry of y is represented by a vertical segment extending from the low value to the high value, with short horizontal segments on the left and right indicating the open and close values, respectively.

Example

julia> meanprices = cumsum(randn(100))
julia> y = OHLC[(p+rand(),p+1,p-1,p+rand()) for p in meanprices]
julia> ohlc(y)
Plots.path3d!Method
path3d(x,y,z)
path3d!(x,y,z)

Plot a 3D path from (x[1],y[1],z[1]) to (x[2],y[2],z[2]), ..., to (x[end],y[end],z[end]).

Example

julia> path3d([0,1,2,3],[0,1,4,9],[0,1,8,27])
Plots.path3dMethod
path3d(x,y,z)
path3d!(x,y,z)

Plot a 3D path from (x[1],y[1],z[1]) to (x[2],y[2],z[2]), ..., to (x[end],y[end],z[end]).

Example

julia> path3d([0,1,2,3],[0,1,4,9],[0,1,8,27])
Plots.quiver!Method
quiver(x,y,quiver=(u,v))
quiver!(x,y,quiver=(u,v))

Make a quiver (vector field) plot. The ith vector extends from (x[i],y[i]) to (x[i] + u[i], y[i] + v[i]).

Example

julia> quiver([1,2,3],[3,2,1],quiver=([1,1,1],[1,2,3]))
Plots.quiverMethod
quiver(x,y,quiver=(u,v))
quiver!(x,y,quiver=(u,v))

Make a quiver (vector field) plot. The ith vector extends from (x[i],y[i]) to (x[i] + u[i], y[i] + v[i]).

Example

julia> quiver([1,2,3],[3,2,1],quiver=([1,1,1],[1,2,3]))
Plots.scatter!Method
scatter(x,y)
scatter!(x,y)

Make a scatter plot of y vs x.

Examples

julia> scatter([1,2,3],[4,5,6],markersize=[3,4,5],markercolor=[:red,:green,:blue])
julia> scatter([(1,4),(2,5),(3,6)])
Plots.scatterMethod
scatter(x,y)
scatter!(x,y)

Make a scatter plot of y vs x.

Examples

julia> scatter([1,2,3],[4,5,6],markersize=[3,4,5],markercolor=[:red,:green,:blue])
julia> scatter([(1,4),(2,5),(3,6)])
Plots.scatter3d!Method
scatter3d(x,y,z)
scatter3d!(x,y,z)

Make a 3D scatter plot.

Example

julia> scatter3d([0,1,2,3],[0,1,4,9],[0,1,8,27])
Plots.scatter3dMethod
scatter3d(x,y,z)
scatter3d!(x,y,z)

Make a 3D scatter plot.

Example

julia> scatter3d([0,1,2,3],[0,1,4,9],[0,1,8,27])
Plots.scatterhist!Method
scatterhist(x)
scatterhist!(x)

Make a histogram scatter plot (bin counts are represented using points instead of bars). See histogram.

Plots.scatterhistMethod
scatterhist(x)
scatterhist!(x)

Make a histogram scatter plot (bin counts are represented using points instead of bars). See histogram.

Plots.stephist!Method
stephist(x)
stephist!(x)

Make a histogram step plot (bin counts are represented using horizontal lines instead of bars). See histogram.

Plots.stephistMethod
stephist(x)
stephist!(x)

Make a histogram step plot (bin counts are represented using horizontal lines instead of bars). See histogram.

Plots.sticks!Method
sticks(x,y)
sticks!(x,y)

Draw a stick plot of y vs x.

Example

julia> sticks(1:10)
Plots.sticksMethod
sticks(x,y)
sticks!(x,y)

Draw a stick plot of y vs x.

Example

julia> sticks(1:10)
Plots.surface!Method
surface(x,y,z)
surface!(x,y,z)

Draw a 3D surface plot.

Example

julia> using LinearAlgebra
julia> x = y = range(-3, stop = 3, length = 100)
julia> surface(x, y, (x, y) -> sinc(norm([x, y])))
Plots.surfaceMethod
surface(x,y,z)
surface!(x,y,z)

Draw a 3D surface plot.

Example

julia> using LinearAlgebra
julia> x = y = range(-3, stop = 3, length = 100)
julia> surface(x, y, (x, y) -> sinc(norm([x, y])))
Plots.violin!Method
violin(x,y,z)
violin!(x,y,z)

Make a violin plot.

Example

julia> violin(repeat([1,2,3],outer=100),randn(300))
Plots.violinMethod
violin(x,y,z)
violin!(x,y,z)

Make a violin plot.

Example

julia> violin(repeat([1,2,3],outer=100),randn(300))
Plots.vline!Method
vline(x)
vline!(x)

Draw vertical lines at positions specified by the values in the AbstractVector x

Example

julia> vline([-1,0,2])
Plots.vlineMethod
vline(x)
vline!(x)

Draw vertical lines at positions specified by the values in the AbstractVector x

Example

julia> vline([-1,0,2])
Plots.vspan!Method
vspan(x)

Draw a rectangle between the vertical line at position x[1] and the vertical line at position x[2]. If length(x) ≥ 4, then further rectangles are drawn between x[3] and x[4], x[5] and x[6], and so on. If length(x) is odd, then the last entry of x is ignored.

Example

julia> vspan(1:6)
Plots.vspanMethod
vspan(x)

Draw a rectangle between the vertical line at position x[1] and the vertical line at position x[2]. If length(x) ≥ 4, then further rectangles are drawn between x[3] and x[4], x[5] and x[6], and so on. If length(x) is odd, then the last entry of x is ignored.

Example

julia> vspan(1:6)
Plots.wireframe!Method
wireframe(x,y,z)
wireframe!(x,y,z)

Draw a 3D wireframe plot.

Example

julia> wireframe(1:10,1:10,randn(10,10))
Plots.wireframeMethod
wireframe(x,y,z)
wireframe!(x,y,z)

Draw a 3D wireframe plot.

Example

julia> wireframe(1:10,1:10,randn(10,10))
Plots.xaxis!Method

Specify x axis attributes for an existing plot

Plots.yaxis!Method

Specify y axis attributes for an existing plot

Animations

RecipesBase.animateFunction

Animate from an iterator which returns the plot args each iteration.

Plots.frameFunction
frame(animation[, plot])

Add a plot (the current plot if not specified) to an existing animation

Missing docstring.

Missing docstring for gif. Check Documenter's build log for details.

Missing docstring.

Missing docstring for mov. Check Documenter's build log for details.

Missing docstring.

Missing docstring for mp4. Check Documenter's build log for details.

Missing docstring.

Missing docstring for webm. Check Documenter's build log for details.

Plots.@animateMacro

Collect one frame per for-block iteration and return an Animation object.

Example:

p = plot(1)
anim = @animate for x=0:0.1:5
    push!(p, 1, sin(x))
end
gif(anim)
Plots.@gifMacro

Builds an Animation using one frame per loop iteration, then create an animated GIF.

Example:

  p = plot(1)
  @gif for x=0:0.1:5
    push!(p, 1, sin(x))
  end

Retriever

Plots.currentFunction
current()

Returns the Plot object for the current plot

Plots.xlimsFunction
xlims([plt])

Returns the x axis limits of the current plot or subplot

Plots.ylimsFunction
ylims([plt])

Returns the y axis limits of the current plot or subplot

Plots.zlimsFunction
zlims([plt])

Returns the z axis limits of the current plot or subplot

Plots.backend_objectFunction
backend_object(plot)

Returns the backend representation of a Plot object. Returns nothing if the backend does not support this.

Plots.plotattrFunction
plotattr([attr])

Look up the properties of a Plots attribute, or specify an attribute type. Call plotattr() for options. The information is the same as that given on https://docs.juliaplots.org/latest/attributes/.

Output

Base.Multimedia.displayFunction
display(x)
display(d::AbstractDisplay, x)
display(mime, x)
display(d::AbstractDisplay, mime, x)

AbstractDisplay x using the topmost applicable display in the display stack, typically using the richest supported multimedia output for x, with plain-text stdout output as a fallback. The display(d, x) variant attempts to display x on the given display d only, throwing a MethodError if d cannot display objects of this type.

In general, you cannot assume that display output goes to stdout (unlike print(x) or show(x)). For example, display(x) may open up a separate window with an image. display(x) means "show x in the best way you can for the current output device(s)." If you want REPL-like text output that is guaranteed to go to stdout, use show(stdout, "text/plain", x) instead.

There are also two variants with a mime argument (a MIME type string, such as "image/png"), which attempt to display x using the requested MIME type only, throwing a MethodError if this type is not supported by either the display(s) or by x. With these variants, one can also supply the "raw" data in the requested MIME type by passing x::AbstractString (for MIME types with text-based storage, such as text/html or application/postscript) or x::Vector{UInt8} (for binary MIME types).

To customize how instances of a type are displayed, overload show rather than display, as explained in the manual section on custom pretty-printing.

source
Plots.closeallMethod

Close all open gui windows of the current backend

Plots.epsFunction
eps([plot,], filename)

Save plot as eps-file.

Plots.guiFunction
gui([plot])

Display a plot using the backends' gui window

Plots.htmlFunction
html([plot,], filename)

Save plot as html-file.

Plots.jsonFunction
json([plot,], filename)

Save plot as json-file.

Plots.pdfFunction
pdf([plot,], filename)

Save plot as pdf-file.

Plots.pngFunction
png([plot,], filename)

Save plot as png-file.

Plots.psFunction
ps([plot,], filename)

Save plot as ps-file.

Plots.savefigMethod
savefig([plot,] filename)

Save a Plot (the current plot if plot is not passed) to file. The file type is inferred from the file extension. All backends support png and pdf file types, some also support svg, ps, eps, html and tex.

Plots.svgFunction
svg([plot,], filename)

Save plot as svg-file.

Plots.texFunction
tex([plot,], filename)

Save plot as tex-file.

Plots.txtFunction
txt([plot,], filename)

Save plot as txt-file.