Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time


First, add the package:

import Pkg

# if you want the latest features:
Pkg.pkg"add Plots#master"

The GR [backend](@ref backends) is included by default, but you can install additional plotting packages if you need a different backend.

Tier 1 support backends (in alphabetical order):

# You do not need to add this package because it is the default backend and
# therefore it is automatically installed with Plots.jl. Note that you might
# need to install additional system packages if you are on Linux, see

# You need to have LaTeX installed on your system

Pkg.add("PlotlyJS"); Pkg.add("PlotlyBase")
# Note that you only need to add this if you need Electron windows and
# additional output formats, otherwise `plotly()` comes shipped with Plots.jl.
# In order to have a good experience with Jupyter, refer to Plotly-specific
# Jupyter installation (

# Depends only on PythonPlot package


Tier 2 support backends:


Learn more about backends here.

Finally, you may wish to add some extensions from the [Plots ecosystem](@ref ecosystem):



using Plots # or StatsPlots
# using GraphRecipes  # if you wish to use GraphRecipes package too

Optionally, [choose a backend](@ref backends) and/or override default settings at the same time:

gr(size = (300, 300), legend = false)  # provide optional defaults
plotly(ticks=:native)                  # plotlyjs for richer saving options
pythonplot()                           # backends are selected with lowercase names
unicodeplots()                         # plot in terminal

!!! tip Plots will use the GR backend by default. You can override this choice by setting an environment variable in your ~/.julia/config/startup.jl file (if the file does not exist, create it). To do this, add e.g. the following line of code: ENV["PLOTS_DEFAULT_BACKEND"] = "PlotlyJS".

!!! tip You can override standard default values in your ~/.julia/config/startup.jl file, for example PLOTS_DEFAULTS = Dict(:markersize => 10, :legend => false, :warn_on_unsupported => false).