# \#plots

**URL:** https://discourse.julialang.org/tag/plots/353.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Change z order/index in Plots.jl](https://discourse.julialang.org/t/change-z-order-index-in-plots-jl/47250)

<div class="topic-metadata">

**Author:** [@OvidiusCicero](https://discourse.julialang.org/u/OvidiusCicero)\
**Replies:** 12\
**Last updated:** [September 21, 2026, 9:50am UTC](https://discourse.julialang.org/t/change-z-order-index-in-plots-jl/47250 "2026-09-21T09:50:37Z")

</div>

Is there a way to change the order in which plots are drawn in Plots.jl? (z index or z order in other suites) For example plot(rand(5)) // unfilled plot!(2rand(5); fill=0) // filled I would like to show unfi…

---

## [Striped Colors for e.g. bar plots in Julia](https://discourse.julialang.org/t/striped-colors-for-e-g-bar-plots-in-julia/64435)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 8\
**Last updated:** [August 24, 2026, 9:27am UTC](https://discourse.julialang.org/t/striped-colors-for-e-g-bar-plots-in-julia/64435 "2026-08-24T09:27:01Z")

</div>

This is an image of a figure a friend made (in matlab), would it be possible to create a similar effect in Julia where the colour is striped (instead of monocolour)? (in this case the stipes helps show that the 4th ba…

---

## [\[ANN\] UniformStreamlines.jl: evenly spaced streamlines in Julia](https://discourse.julialang.org/t/ann-uniformstreamlines-jl-evenly-spaced-streamlines-in-julia/136784)

<div class="topic-metadata">

**Author:** [@tonygem96](https://discourse.julialang.org/u/tonygem96)\
**Replies:** 0\
**Last updated:** [April 20, 2026, 3:26am UTC](https://discourse.julialang.org/t/ann-uniformstreamlines-jl-evenly-spaced-streamlines-in-julia/136784 "2026-04-20T03:26:36Z")

</div>

Announcing UniformStreamlines.jl, a lightweight Julia package for generating and plotting evenly spaced streamlines in 2D, 3D, and N-D vector fields using the Jobard–Lefer algorithm. It works with both function-defined …

---

## [Change arrow head size in e.g. quiver plots](https://discourse.julialang.org/t/change-arrow-head-size-in-e-g-quiver-plots/109347)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 7\
**Last updated:** [March 24, 2026, 7:10am UTC](https://discourse.julialang.org/t/change-arrow-head-size-in-e-g-quiver-plots/109347 "2026-03-24T07:10:52Z")

</div>

I am trying to make a quiver plot using Plots. Unfortunatley, the heads of the arrows keeps being way to large for the plot to be usable. I have been trying various arguments to change this, but nothing seems to help. H…

---

## [Changing font family in Plots using pythonplot() (globally)](https://discourse.julialang.org/t/changing-font-family-in-plots-using-pythonplot-globally/135679)

<div class="topic-metadata">

**Author:** [@maltee1](https://discourse.julialang.org/u/maltee1)\
**Replies:** 1\
**Last updated:** [February 16, 2026, 3:01pm UTC](https://discourse.julialang.org/t/changing-font-family-in-plots-using-pythonplot-globally/135679 "2026-02-16T15:01:39Z")

</div>

Specifically to “Latin Modern Roman”, to have it match the LaTeX document the plots will be used in. This seems like a simple issue, just set const PLOTS\_DEFAULTS = Dict( :theme=\>:default, :fontfamily =\> "Latin …

---

## [Savefig causes a flash on the display](https://discourse.julialang.org/t/savefig-causes-a-flash-on-the-display/56647)

<div class="topic-metadata">

**Author:** [@LeePhillips](https://discourse.julialang.org/u/LeePhillips)\
**Replies:** 2\
**Last updated:** [January 30, 2026, 8:46pm UTC](https://discourse.julialang.org/t/savefig-causes-a-flash-on-the-display/56647 "2026-01-30T20:46:02Z")

</div>

Calling savefig(“file”) writes the file, and the plots are as expected. But every call causes the screen to flash. I believe the plot is momentarily displayed and the plot window removed before the file is written. Runni…

---

## [Skip empty entries of sparse matrix when plotting a heatmap](https://discourse.julialang.org/t/skip-empty-entries-of-sparse-matrix-when-plotting-a-heatmap/135343)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 5\
**Last updated:** [January 30, 2026, 8:11pm UTC](https://discourse.julialang.org/t/skip-empty-entries-of-sparse-matrix-when-plotting-a-heatmap/135343 "2026-01-30T20:11:30Z")

</div>

I want to plot a sparse matrix as a heatmap, something like this: julia\> using Plots, SparseArrays julia\> x = sprand(Float64, 5, 5, 0.5) 5×5 SparseMatrixCSC{Float64, Int64} with 11 stored entries: ⋅ ⋅ …

---

## [Plots.jl: QPaintDevice: Cannot destroy paint device that is being painted \[SOLVED\]](https://discourse.julialang.org/t/plots-jl-qpaintdevice-cannot-destroy-paint-device-that-is-being-painted-solved/135323)

<div class="topic-metadata">

**Author:** [@ericsfraga](https://discourse.julialang.org/u/ericsfraga)\
**Replies:** 1\
**Last updated:** [January 29, 2026, 1:46pm UTC](https://discourse.julialang.org/t/plots-jl-qpaintdevice-cannot-destroy-paint-device-that-is-being-painted-solved/135323 "2026-01-29T13:46:15Z")

</div>

Good morning. Anybody here using the Plots.jl package for Julia? I am trying to generate some plots in files without having them display on the screen. I have a sequence of plt = plot(...) plot!(plt, ...) plot!(plt, ...…

---

## [Increase margin of combined plot made out of subplots with Plots.jl](https://discourse.julialang.org/t/increase-margin-of-combined-plot-made-out-of-subplots-with-plots-jl/135270)

<div class="topic-metadata">

**Author:** [@Fourier](https://discourse.julialang.org/u/Fourier)\
**Replies:** 2\
**Last updated:** [January 26, 2026, 2:23pm UTC](https://discourse.julialang.org/t/increase-margin-of-combined-plot-made-out-of-subplots-with-plots-jl/135270 "2026-01-26T14:23:00Z")

</div>

I am plotting multiple plots in a combined plot like this: using Plots using Plots.Measures: mm plots = Vector{Any}() for (i,j) in Iterators.product(1:4, 1:4) p = scatter(rand(100), xlabel="X-axis $i,$j", ylabel="Y…

---

## [Plot every columns of a DataFrame](https://discourse.julialang.org/t/plot-every-columns-of-a-dataframe/134808)

<div class="topic-metadata">

**Author:** [@Ju\_ska](https://discourse.julialang.org/u/Ju_ska)\
**Replies:** 5\
**Last updated:** [January 7, 2026, 6:58pm UTC](https://discourse.julialang.org/t/plot-every-columns-of-a-dataframe/134808 "2026-01-07T18:58:41Z")

</div>

Hi, I would like to stack plots on top of each other without having to manage columns. Like separating the x axis from every other columns, then plot. using DataFrames using Plots df = DataFrame(x = \[1,2,3,4\], y1 = \[…

---

## [Heatmap(): how do ylim and yflip interact?](https://discourse.julialang.org/t/heatmap-how-do-ylim-and-yflip-interact/134804)

<div class="topic-metadata">

**Author:** [@dankelley](https://discourse.julialang.org/u/dankelley)\
**Replies:** 4\
**Last updated:** [December 30, 2025, 3:24pm UTC](https://discourse.julialang.org/t/heatmap-how-do-ylim-and-yflip-interact/134804 "2025-12-30T15:24:54Z")

</div>

Hello, and happy (almost) New Year., First, I’ll apologize for a long-winded question… I am a longtime R user who is gradually moving to Julia. As an oceanographer, a common task I have is to make image plots of a wate…

---

## [Plots with log or symlog scale](https://discourse.julialang.org/t/plots-with-log-or-symlog-scale/15961)

<div class="topic-metadata">

**Author:** [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Replies:** 5\
**Last updated:** [November 27, 2025, 1:49am UTC](https://discourse.julialang.org/t/plots-with-log-or-symlog-scale/15961 "2025-11-27T01:49:35Z")

</div>

I’m trying to make plots with log and symlog scales, but no success with Plots.jl so far. When I try cgrad(scale=:log) it gives strange results, see below. And there seem to be no other place to specify log-scale. A = r…

---

## [Plots stopped working (more or less out of nowhere)](https://discourse.julialang.org/t/plots-stopped-working-more-or-less-out-of-nowhere/133929)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 18\
**Last updated:** [November 18, 2025, 2:02pm UTC](https://discourse.julialang.org/t/plots-stopped-working-more-or-less-out-of-nowhere/133929 "2025-11-18T14:02:24Z")

</div>

I have an environment which was fine, but after not touching it for a week, suddenly it does no longer work. I haven’t done anything to package versions, so there must be something weirder going on. I have been back and …

---

## [\[ANN\] UnicodePlots.jl v2.8.0 - 3D plots](https://discourse.julialang.org/t/ann-unicodeplots-jl-v2-8-0-3d-plots/75963)

<div class="topic-metadata">

**Author:** [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Replies:** 20\
**Last updated:** [October 15, 2025, 4:38pm UTC](https://discourse.julialang.org/t/ann-unicodeplots-jl-v2-8-0-3d-plots/75963 "2025-10-15T16:38:48Z")

</div>

Announcing UnicodePlots v2.8.0, which brings up 3D plots. Examples: surfaceplot isosurface Useful for in situ post-processing of simulations, or as a development helper for 3D codes. In case you missed out, c…

---

## [Open multiple figure windows using Plots](https://discourse.julialang.org/t/open-multiple-figure-windows-using-plots/130859)

<div class="topic-metadata">

**Author:** [@bernardofpc](https://discourse.julialang.org/u/bernardofpc)\
**Replies:** 8\
**Last updated:** [October 10, 2025, 5:29pm UTC](https://discourse.julialang.org/t/open-multiple-figure-windows-using-plots/130859 "2025-10-10T17:29:12Z")

</div>

I would like to use scripts, in the REPL, to display multiple figures from a function. Using PyPlot and plt.figure allows it, but Plots does not seem to have a way of doing so. My MWE: using Plots import PyPlot plt = …

---

## [Using environment variables with Plots](https://discourse.julialang.org/t/using-environment-variables-with-plots/132842)

<div class="topic-metadata">

**Author:** [@J-Holger](https://discourse.julialang.org/u/J-Holger)\
**Replies:** 2\
**Last updated:** [October 6, 2025, 12:39pm UTC](https://discourse.julialang.org/t/using-environment-variables-with-plots/132842 "2025-10-06T12:39:07Z")

</div>

Hi! I’m using the Plots (v1.41.1) package to create and save figures in Julia. Currently, I’m using PlotlyJS as backend and everything works well. The problem is that my application does not have access to internet so I…

---

## [How do I put the heatmap colorbar at the top of the plot?](https://discourse.julialang.org/t/how-do-i-put-the-heatmap-colorbar-at-the-top-of-the-plot/132893)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 2\
**Last updated:** [October 6, 2025, 7:48am UTC](https://discourse.julialang.org/t/how-do-i-put-the-heatmap-colorbar-at-the-top-of-the-plot/132893 "2025-10-06T07:48:38Z")

</div>

using the Plots package. I looked here: Cannot change colorbar position, which does suggest that heatmap(rand(5,5); cb=:top) should work, however, it does not. Might be that it requires the pgfplot backend, but seems …

---

## [Plot several shapes as part of a single series using Plots.jl](https://discourse.julialang.org/t/plot-several-shapes-as-part-of-a-single-series-using-plots-jl/132878)

<div class="topic-metadata">

**Author:** [@alan](https://discourse.julialang.org/u/alan)\
**Replies:** 2\
**Last updated:** [October 5, 2025, 12:17pm UTC](https://discourse.julialang.org/t/plot-several-shapes-as-part-of-a-single-series-using-plots-jl/132878 "2025-10-05T12:17:15Z")

</div>

I’m trying to plot several rectangles of the same color, and I want them to show up as a single entry in the legend. But my code produces a separate legend entry for each rectangle. Suggestions? using Plots function re…

---

## [Plots.Heatmap: how to set colour of NaN values?](https://discourse.julialang.org/t/plots-heatmap-how-to-set-colour-of-nan-values/132873)

<div class="topic-metadata">

**Author:** [@dankelley](https://discourse.julialang.org/u/dankelley)\
**Replies:** 2\
**Last updated:** [October 4, 2025, 2:19pm UTC](https://discourse.julialang.org/t/plots-heatmap-how-to-set-colour-of-nan-values/132873 "2025-10-04T14:19:50Z")

</div>

I tried the following, which I thought would have a red box in the middle. But the box is white. Is there a way for me to control this? (Note: I’m a newbie, and sticking to base Plots for now. I’m hoping to not have m…

---

## [Problems using Plots.jl](https://discourse.julialang.org/t/problems-using-plots-jl/132623)

<div class="topic-metadata">

**Author:** [@Roy\_Eisenberg](https://discourse.julialang.org/u/Roy_Eisenberg)\
**Replies:** 10\
**Last updated:** [September 25, 2025, 5:47am UTC](https://discourse.julialang.org/t/problems-using-plots-jl/132623 "2025-09-25T05:47:31Z")

</div>

So I am creating a gif of a Julia set zoom using the Plots.jl package (gr backend), and there are two problems I am unable to solve: Firstly, the plot doesn’t cover the entire window despite removing the axes and legend…

---

## [Cheat sheet for Plots and Makie](https://discourse.julialang.org/t/cheat-sheet-for-plots-and-makie/132151)

<div class="topic-metadata">

**Author:** [@yolhan\_mannes](https://discourse.julialang.org/u/yolhan_mannes)\
**Replies:** 2\
**Last updated:** [September 7, 2025, 1:05pm UTC](https://discourse.julialang.org/t/cheat-sheet-for-plots-and-makie/132151 "2025-09-07T13:05:50Z")

</div>

Hello, do you think we could have something similar its really useful I think maybe in the docs directly ? It’s in GitHub - matplotlib/cheatsheets: Official Matplotlib cheat sheets

---

## [Custom color palette (including associated value range)](https://discourse.julialang.org/t/custom-color-palette-including-associated-value-range/131949)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 3\
**Last updated:** [August 31, 2025, 8:37pm UTC](https://discourse.julialang.org/t/custom-color-palette-including-associated-value-range/131949 "2025-08-31T20:37:27Z")

</div>

I am looking to how create a custom “legend” for my plots where I associate given colours to custom ranges, for example: 0:0.5 =\> darkdarkred 0.0:0.75 =\> darkred 0.75:1 =\> red 1:1.25 =\> green 1.25:1.5 =\> darkgree…

---

## [Is there a way to have heatmap and contours from other variables in Plots.jl with GR?](https://discourse.julialang.org/t/is-there-a-way-to-have-heatmap-and-contours-from-other-variables-in-plots-jl-with-gr/131869)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 2\
**Last updated:** [August 27, 2025, 11:59am UTC](https://discourse.julialang.org/t/is-there-a-way-to-have-heatmap-and-contours-from-other-variables-in-plots-jl-with-gr/131869 "2025-08-27T11:59:18Z")

</div>

Hi all! I’m trying to plot a heat map of one variable (with all values \>\>0), but on the same plot, I want to plot contours of two other variables where they equal 0. When I try countour! after plotting the heatmap, the…

---

## [How to disable print-outs when plotting (for \`savefig\` on e.g. hpc)](https://discourse.julialang.org/t/how-to-disable-print-outs-when-plotting-for-savefig-on-e-g-hpc/131592)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 0\
**Last updated:** [August 13, 2025, 5:27pm UTC](https://discourse.julialang.org/t/how-to-disable-print-outs-when-plotting-for-savefig-on-e-g-hpc/131592 "2025-08-13T17:27:21Z")

</div>

I am running some code on a hpc server (both interactively in the terminal and using slurm). As part of the process I am getting print outs like qt.qpa.xcb: could not connect to display localhost:13.0 qt.qpa.plugin: Fro…

---

## [Adjust the decimals in scientific notation with Plots.jl](https://discourse.julialang.org/t/adjust-the-decimals-in-scientific-notation-with-plots-jl/131555)

<div class="topic-metadata">

**Author:** [@kraqbi](https://discourse.julialang.org/u/kraqbi)\
**Replies:** 8\
**Last updated:** [August 13, 2025, 3:24pm UTC](https://discourse.julialang.org/t/adjust-the-decimals-in-scientific-notation-with-plots-jl/131555 "2025-08-13T15:24:10Z")

</div>

Hello! I try to publish my figures so I need to edit them as nicely as possible. I have trouble adjusting the format of my ylabel. I would like to keep a scientific notation, but Plots.jl is automatically set to a two…

---

## [Colorbar of a Contour Plot](https://discourse.julialang.org/t/colorbar-of-a-contour-plot/131566)

<div class="topic-metadata">

**Author:** [@prconlin](https://discourse.julialang.org/u/prconlin)\
**Replies:** 3\
**Last updated:** [August 12, 2025, 7:02pm UTC](https://discourse.julialang.org/t/colorbar-of-a-contour-plot/131566 "2025-08-12T19:02:18Z")

</div>

Hello, I have a matrix of discrete values, and I would like to plot it as a contour plot instead of a heatmap, because reasons. This works well enough, except that the colorbar is strange and I can’t find a way to corr…

---

## [Not plots with plotly, apple silicon and VSCode](https://discourse.julialang.org/t/not-plots-with-plotly-apple-silicon-and-vscode/131550)

<div class="topic-metadata">

**Author:** [@romain-chiap](https://discourse.julialang.org/u/romain-chiap)\
**Replies:** 2\
**Last updated:** [August 12, 2025, 3:15pm UTC](https://discourse.julialang.org/t/not-plots-with-plotly-apple-silicon-and-vscode/131550 "2025-08-12T15:15:56Z")

</div>

Hello dears, I just changed my macos intel for a macos M4 and I’m trying to run my jupyter notebook plotting scripts. Here is a snippet of my code using Plots BG\_COLOR = RGB(0.2, 0.2, 0.2); # background color of the p…

---

## [Adding a plot onto a heatmap with scale squeezes it in Plots.jl](https://discourse.julialang.org/t/adding-a-plot-onto-a-heatmap-with-scale-squeezes-it-in-plots-jl/131439)

<div class="topic-metadata">

**Author:** [@Gako](https://discourse.julialang.org/u/Gako)\
**Replies:** 2\
**Last updated:** [August 7, 2025, 11:50am UTC](https://discourse.julialang.org/t/adding-a-plot-onto-a-heatmap-with-scale-squeezes-it-in-plots-jl/131439 "2025-08-07T11:50:55Z")

</div>

I want to add a reference line to a heatmap and am currently doing it as follows: using Plots plot1 = heatmap(1:100, 1:100, rand(100, 100), scale=:log10) plot!(plot1, 1:100, ones(100) .\* 4, label="") This works but som…

---

## [Plot Shape by Value](https://discourse.julialang.org/t/plot-shape-by-value/131183)

<div class="topic-metadata">

**Author:** [@ziolai](https://discourse.julialang.org/u/ziolai)\
**Replies:** 17\
**Last updated:** [August 6, 2025, 6:02pm UTC](https://discourse.julialang.org/t/plot-shape-by-value/131183 "2025-08-06T18:02:08Z")

</div>

Greetings. I am seeking to extend using Plots p1 = \[(0., 0.), (1., 0.), (2., 0.)\]; p2 = \[(1., 0.), (2., 0.), (3., 0.)\]; p3 = \[(1., 1.), (2., 1.), (3., 1.)\]; p = Plots.plot(xlabel = "x", ylabel = "y",legend = false,a…

---

## [Plots with PlotlyJS error](https://discourse.julialang.org/t/plots-with-plotlyjs-error/131303)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 4\
**Last updated:** [August 2, 2025, 7:31pm UTC](https://discourse.julialang.org/t/plots-with-plotlyjs-error/131303 "2025-08-02T19:31:52Z")

</div>

I am trying to use Plots with the PlotlyJS backend. Using 1.11.6 on Win 11 my code snippet is: using Plots using PlotlyKaleido using PlotlyJS plotlyjs() I get this message: Precompiling PlotlyJS... Info Given Plotly…

[Next page](https://discourse.julialang.org/tag/plots/353.md?match_all_tags=true&page=1&tags%5B%5D=plots)
