Skip to content

Commit

Permalink
docs: update install.md
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg authored Nov 12, 2024
1 parent aa34c88 commit d38e624
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions docs/src/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ First, add the package:

```julia
import Pkg
Pkg.add("Plots")
Pkg.add("Plots") # ≡ `PlotsBase` + `GR` backend

Pkg.add("PlotBase", "PythonPlot") # `PlotsBase` + `PythonPlot` backend, avoids installaing the `GR` backend

# if you want the latest features:
Pkg.pkg"add Plots#master"
Expand All @@ -21,25 +23,19 @@ Pkg.add("GR")
# need to install additional system packages if you are on Linux, see
# https://gr-framework.org/julia.html#installation

Pkg.add("PGFPlotsX")
# You need to have LaTeX installed on your system
Pkg.add("UnicodePlots") # simplest terminal based backend (guaranteed to work from a cluster, e.g. without X forwarding)

Pkg.add("PGFPlotsX") # 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 (https://github.com/plotly/plotly.py#installation)

Pkg.add("PythonPlot")
# Depends only on PythonPlot package

Pkg.add("UnicodePlots")
```
Pkg.add("PythonPlot") # depends only on PythonPlot package

Tier 2 support backends:
```julia
Pkg.add("InspectDR")
Pkg.add("Gaston")
Pkg.add("Gaston") # Gnuplot based backend
```

Learn more about backends [here](https://docs.juliaplots.org/latest/backends/).
Expand All @@ -58,20 +54,24 @@ Pkg.add("GraphRecipes")
```julia
using Plots # or StatsPlots
# using GraphRecipes # if you wish to use GraphRecipes package too

# or alternatively
import PythonPlot # select installed backend (triggered by packages extensions: https://docs.julialang.org/en/v1/manual/code-loading/#man-extensions)
using PlotsBase
```

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

```julia
gr(size = (300, 300), legend = false) # provide optional defaults
unicodeplots() # plot in terminal
pgfplotsx()
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"`.
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["PLOTSBASE_DEFAULT_BACKEND"] = "UnicodePlots"`.

!!! 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)`.
Expand Down

0 comments on commit d38e624

Please sign in to comment.