Summary in a discourse thread by Chris Rackauckas
Plots.jl : powerful and convenient visualization with multiple backends. See also Plots.jl docs
PythonPlot.jl :
matplotlibin Julia. See also matplotlib docsMakie.jl : see the Makie.jl docs for examples.
PythonPlot.jl tips¶
“Clean” installation¶
If you don’t want CondaPkg.jl install a full conda environment in every project, you can prepare a common environment by micromamba.
Install micromamba, the minimal Python package manager.
Create a conda environment, for example,
micromamba create -n juliapy jupyter matplotlib -y.Set up the following environment variables
~/.profile
export CONDA_JL_HOME="${HOME}/micromamba/envs/juliapy"
export JULIA_PYTHONCALL_EXE="${CONDA_JL_HOME}/bin/python"
export JULIA_CONDAPKG_BACKEND="Null"Rebuild
Conda.jlorPythonCall.jlif necessary.
] build Conda
] build PythonCallSave as TIFF¶
Exporting pyplot figures to TIFF images with a specific dpi and LZW compression for publishing.
using PythonCall
plt.savefig("fig1.tif", dpi=300, pil_kwargs=pydict(Dict("compression" => "tiff_lzw")))Change default options¶
import PythonPlot as plt
plt.matplotlib.rcParams["font.size"] = 14