# \#pyplot

**URL:** https://discourse.julialang.org/tag/pyplot/20.md

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

---

## [Package breakage due to change in dependency](https://discourse.julialang.org/t/package-breakage-due-to-change-in-dependency/134575)

<div class="topic-metadata">

**Author:** [@sparrowhawk](https://discourse.julialang.org/u/sparrowhawk)\
**Replies:** 3\
**Last updated:** [December 16, 2025, 5:14am UTC](https://discourse.julialang.org/t/package-breakage-due-to-change-in-dependency/134575 "2025-12-16T05:14:48Z")

</div>

Hi Julia folks, I have a registered package that used to install PyPlot with a build.jl in a deps/ folder as follows: import Pkg, Conda @info "building!" Conda.pip\_interop(true) Conda.pip("install", "matplotlib==3.7.3"…

---

## [PythonPlot instead of PyPlot](https://discourse.julialang.org/t/pythonplot-instead-of-pyplot/133923)

<div class="topic-metadata">

**Author:** [@sparrowhawk](https://discourse.julialang.org/u/sparrowhawk)\
**Replies:** 0\
**Last updated:** [November 17, 2025, 6:01am UTC](https://discourse.julialang.org/t/pythonplot-instead-of-pyplot/133923 "2025-11-17T06:01:40Z")

</div>

Hi all, I’ve been having trouble with matplotlib dependencies within my package when using PyPlot.jl – most of these errors crop up when there are upstream changes within Conda/matplotlib, that show up during the compil…

---

## [How to install PyPlot on a server](https://discourse.julialang.org/t/how-to-install-pyplot-on-a-server/131419)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [August 7, 2025, 11:06am UTC](https://discourse.julialang.org/t/how-to-install-pyplot-on-a-server/131419 "2025-08-07T11:06:01Z")

</div>

When trying to install PyPlot on DelftBlue, the supercomputer of TU Delft, running on Red Hat Enterprise Linux 8, I get the following error: ImportError("/home/uwefechner/.julia/juliaup/julia-1.11.6+0.x64.linux.gnu/bin/…

---

## [How to use NumPy slices in 2d for PyPlot's GridSpec](https://discourse.julialang.org/t/how-to-use-numpy-slices-in-2d-for-pyplots-gridspec/40023)

<div class="topic-metadata">

**Author:** [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)\
**Replies:** 3\
**Last updated:** [June 15, 2025, 1:06pm UTC](https://discourse.julialang.org/t/how-to-use-numpy-slices-in-2d-for-pyplots-gridspec/40023 "2025-06-15T13:06:52Z")

</div>

I am trying to create a plot with multiple subplots in PyPlot. For that I am using matplotlib’s GridSpec . Some of the usage is given by NumPy slices as seen in their example from the docs: fig8 = plt.figure(constraine…

---

## [Font family 'Computer Modern' not found](https://discourse.julialang.org/t/font-family-computer-modern-not-found/93355)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 5\
**Last updated:** [April 13, 2025, 3:25am UTC](https://discourse.julialang.org/t/font-family-computer-modern-not-found/93355 "2025-04-13T03:25:40Z")

</div>

Defining “Computer Modern” as default font familly is very convenient when using Plots.jl default gr() backend, as per this other post. However, using the pyplot or pythonplot backends issues the warning message: find…

---

## [Combining LaTeX with variables in PyPlot title](https://discourse.julialang.org/t/combining-latex-with-variables-in-pyplot-title/41128)

<div class="topic-metadata">

**Author:** [@fusion809](https://discourse.julialang.org/u/fusion809)\
**Replies:** 9\
**Last updated:** [December 14, 2024, 12:30am UTC](https://discourse.julialang.org/t/combining-latex-with-variables-in-pyplot-title/41128 "2024-12-14T00:30:57Z")

</div>

This is somewhat similar to PyPlot: how to include a variable in a title, but with the added complication of including LaTeX in the title too. See I have this code: PyPlot.title(L"Plot of the 1st eigenfunction, correspo…

---

## [Custom color gradient transition points for heatmap in Plots using pyplot backend](https://discourse.julialang.org/t/custom-color-gradient-transition-points-for-heatmap-in-plots-using-pyplot-backend/116724)

<div class="topic-metadata">

**Author:** [@cmdenis](https://discourse.julialang.org/u/cmdenis)\
**Replies:** 5\
**Last updated:** [July 8, 2024, 8:24am UTC](https://discourse.julialang.org/t/custom-color-gradient-transition-points-for-heatmap-in-plots-using-pyplot-backend/116724 "2024-07-08T08:24:55Z")

</div>

Hello, I am trying to plot a heatmap using a custom color gradient. More precisely, I want to space out the colors in a particular way. However, I am unable to set the color gradient appropriately using the pyplot pack…

---

## [Pyplot in Julia PyError](https://discourse.julialang.org/t/pyplot-in-julia-pyerror/115310)

<div class="topic-metadata">

**Author:** [@Sihyun\_Kim](https://discourse.julialang.org/u/Sihyun_Kim)\
**Replies:** 7\
**Last updated:** [June 7, 2024, 8:33pm UTC](https://discourse.julialang.org/t/pyplot-in-julia-pyerror/115310 "2024-06-07T20:33:59Z")

</div>

Python and matplotlib are installed in anaconda 3. I am trying to import it to julia. I type in repl: using PyPlot Then It shows the following message: \[ Info: Installing matplotlib via the Conda matplotlib package...…

---

## [How to plot a curvilinear domain using Plots?](https://discourse.julialang.org/t/how-to-plot-a-curvilinear-domain-using-plots/111804)

<div class="topic-metadata">

**Author:** [@arturofburgos](https://discourse.julialang.org/u/arturofburgos)\
**Replies:** 2\
**Last updated:** [March 19, 2024, 3:39pm UTC](https://discourse.julialang.org/t/how-to-plot-a-curvilinear-domain-using-plots/111804 "2024-03-19T15:39:58Z")

</div>

Hello Everyone, I have been trying to create the same plot here that I created using PyPlot, but now using Plots. Does anyone know how to work around this issue? using PyPlot # ion() # pygui(true) r\_ini = 1.0 r\_end = …

---

## [How to re-draw a plot with PyPlot](https://discourse.julialang.org/t/how-to-re-draw-a-plot-with-pyplot/111701)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [March 16, 2024, 5:42pm UTC](https://discourse.julialang.org/t/how-to-re-draw-a-plot-with-pyplot/111701 "2024-03-16T17:42:25Z")

</div>

I can create a plot with PyPlot: using PyPlot fig=figure("first") X = 0:0.1:2pi Y = sin.(X) p = plot(X, Y) But after closing the PyPlot window I cannot get it back. I tried: p display(p) show(p) fig display(fig) sho…

---

## [Change the values in colorbar to cover all values](https://discourse.julialang.org/t/change-the-values-in-colorbar-to-cover-all-values/107603)

<div class="topic-metadata">

**Author:** [@quantum](https://discourse.julialang.org/u/quantum)\
**Replies:** 0\
**Last updated:** [December 14, 2023, 9:07am UTC](https://discourse.julialang.org/t/change-the-values-in-colorbar-to-cover-all-values/107603 "2023-12-14T09:07:40Z")

</div>

I am new to python and Julia. I want add a color bar to a scatter plot. But the values of colorbar just cover one group of points. How can I change the color bar to cover all the values? My code attached. fig, ax = PyPl…

---

## [System image with PyPlot.jl](https://discourse.julialang.org/t/system-image-with-pyplot-jl/107320)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [December 8, 2023, 12:00pm UTC](https://discourse.julialang.org/t/system-image-with-pyplot-jl/107320 "2023-12-08T12:00:06Z")

</div>

I created a small project, see: GitHub - ufechner7/Tethers.jl: Tether models For now the code is trivial, but to avoid high time-to-first plot I created a custom system image with ModelingToolkit, OrdinaryDiffEq, and P…

---

## [PyPlot vmin and vmax equivalent in Makie?](https://discourse.julialang.org/t/pyplot-vmin-and-vmax-equivalent-in-makie/105276)

<div class="topic-metadata">

**Author:** [@jddorellanao](https://discourse.julialang.org/u/jddorellanao)\
**Replies:** 1\
**Last updated:** [October 22, 2023, 11:54am UTC](https://discourse.julialang.org/t/pyplot-vmin-and-vmax-equivalent-in-makie/105276 "2023-10-22T11:54:02Z")

</div>

In PyPlot.jl when plotting a 2D matrix using imshow() you can set vmin and vmax wich acording to the official documentation: " vmin and vmax define the data range that the colormap covers." Using this package I create t…

---

## [Why is the ticks fontfamily not changing?](https://discourse.julialang.org/t/why-is-the-ticks-fontfamily-not-changing/102814)

<div class="topic-metadata">

**Author:** [@SYSYS33](https://discourse.julialang.org/u/SYSYS33)\
**Replies:** 4\
**Last updated:** [August 16, 2023, 5:42am UTC](https://discourse.julialang.org/t/why-is-the-ticks-fontfamily-not-changing/102814 "2023-08-16T05:42:50Z")

</div>

I am using Julia 1.9.2, Plots v1.38.17, PyPlot v2.11.1. When I plot, the font of the tick labels doesn’t change. Not working “fontfamily” and “tickfontfamily”. Is this a bug in the new version of Julia, or is there a …

---

## [Remove top or bottom axis in :box plot](https://discourse.julialang.org/t/remove-top-or-bottom-axis-in-box-plot/100897)

<div class="topic-metadata">

**Author:** [@cmdenis](https://discourse.julialang.org/u/cmdenis)\
**Replies:** 6\
**Last updated:** [June 29, 2023, 12:31pm UTC](https://discourse.julialang.org/t/remove-top-or-bottom-axis-in-box-plot/100897 "2023-06-29T12:31:40Z")

</div>

Hi there, I’ve been searching for a way of doing this, but cannot find anything… I’ve been trying to make a box plot but with a missing axis. Essentially, I would like to get the results given by plot(framestyle = :bo…

---

## [Plotting Probability Distribution of Data](https://discourse.julialang.org/t/plotting-probability-distribution-of-data/99976)

<div class="topic-metadata">

**Author:** [@optimist](https://discourse.julialang.org/u/optimist)\
**Replies:** 3\
**Last updated:** [June 7, 2023, 5:45pm UTC](https://discourse.julialang.org/t/plotting-probability-distribution-of-data/99976 "2023-06-07T17:45:26Z")

</div>

I am trying to produce a plot of probability distribution function of some data which is a result of simulations. Using density function from StatPlots is showing some weird y-axis numbers. I would expect it to be rangin…

---

## [Matplotlib & Julia : Pcolormesh and mask](https://discourse.julialang.org/t/matplotlib-julia-pcolormesh-and-mask/1792)

<div class="topic-metadata">

**Author:** [@lcambier](https://discourse.julialang.org/u/lcambier)\
**Replies:** 2\
**Last updated:** [May 11, 2023, 3:55pm UTC](https://discourse.julialang.org/t/matplotlib-julia-pcolormesh-and-mask/1792 "2023-05-11T15:55:48Z")

</div>

Hi, I have a 2d matrix with values that I currently plot doing something like axis\[:pcolormesh\](A', vmin=minimum(A\[:\]), vmax=0, edgecolor="white") But some values in A are non-relevant and I’d like to give them a whit…

---

## [Conda Not installing Matplotlib for PyPlot](https://discourse.julialang.org/t/conda-not-installing-matplotlib-for-pyplot/96813)

<div class="topic-metadata">

**Author:** [@Perrin\_Meyer](https://discourse.julialang.org/u/Perrin_Meyer)\
**Replies:** 13\
**Last updated:** [April 10, 2023, 8:36am UTC](https://discourse.julialang.org/t/conda-not-installing-matplotlib-for-pyplot/96813 "2023-04-10T08:36:36Z")

</div>

I started with a fresh install of Julia 1.9.0-rc1 (I wiped .julia clean) PyCall Conda does not seem to be installing matplotlib correctly. This has worked for me many times before on many different machines…The culprit …

---

## [PyPlot Scatter-Plot Performance](https://discourse.julialang.org/t/pyplot-scatter-plot-performance/94129)

<div class="topic-metadata">

**Author:** [@ratwolf](https://discourse.julialang.org/u/ratwolf)\
**Replies:** 12\
**Last updated:** [March 6, 2023, 1:27pm UTC](https://discourse.julialang.org/t/pyplot-scatter-plot-performance/94129 "2023-03-06T13:27:38Z")

</div>

I wrote a small program to display the “Hopalong Attractor”. The calculations themselves are relatively fast, as is the scatter plot if you only use a single color. Coloring the scatterplot as a function of the distance…

---

## [Plots backend pythonplot colormap has no effect when legend is false](https://discourse.julialang.org/t/plots-backend-pythonplot-colormap-has-no-effect-when-legend-is-false/94483)

<div class="topic-metadata">

**Author:** [@jinfreedom](https://discourse.julialang.org/u/jinfreedom)\
**Replies:** 3\
**Last updated:** [February 12, 2023, 7:06pm UTC](https://discourse.julialang.org/t/plots-backend-pythonplot-colormap-has-no-effect-when-legend-is-false/94483 "2023-02-12T19:06:18Z")

</div>

Hi, I’m using Plots’s :pythonplot backend with heatmap and found the keyword cmap=:jet does not have any effect when legend or colorbar is false. Since If instead I use gr, it works fine: julia\> heatmap(yc\[:\],xc,Itc\[:,…

---

## [Margins controls for PyPlot](https://discourse.julialang.org/t/margins-controls-for-pyplot/93759)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 1\
**Last updated:** [January 30, 2023, 1:07pm UTC](https://discourse.julialang.org/t/margins-controls-for-pyplot/93759 "2023-01-30T13:07:11Z")

</div>

Hello what are the Julia PyPlot equivalents to R’s margin parameters oma and mai? Thank you

---

## [Change decimal separator when plotting with PyPlot (or PythonPlot)](https://discourse.julialang.org/t/change-decimal-separator-when-plotting-with-pyplot-or-pythonplot/93367)

<div class="topic-metadata">

**Author:** [@marllos](https://discourse.julialang.org/u/marllos)\
**Replies:** 8\
**Last updated:** [January 23, 2023, 2:57pm UTC](https://discourse.julialang.org/t/change-decimal-separator-when-plotting-with-pyplot-or-pythonplot/93367 "2023-01-23T14:57:01Z")

</div>

Hello everybody. When the time comes to publish the thesis, we may be faced with a big surprise: the University Library requires the decimal separator to be a comma, and they don’t want any excuses. So, hundreds of graph…

---

## [Extremely tiny font in pyplot windows](https://discourse.julialang.org/t/extremely-tiny-font-in-pyplot-windows/92863)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 2\
**Last updated:** [January 13, 2023, 6:51am UTC](https://discourse.julialang.org/t/extremely-tiny-font-in-pyplot-windows/92863 "2023-01-13T06:51:07Z")

</div>

This is a somewhat unusual issue that I’m facing: the font sizes in the matplotlib windows is far too small: I’m using PyPlot.jl for my plots, and trying to save the plot from the icon in the plot window. Does anyon…

---

## [PyPlot broken under 1.7?](https://discourse.julialang.org/t/pyplot-broken-under-1-7/72971)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 9\
**Last updated:** [November 24, 2022, 4:02pm UTC](https://discourse.julialang.org/t/pyplot-broken-under-1-7/72971 "2022-11-24T16:02:46Z")

</div>

Pkg.add shows errors in PyCall and PyPlot, requesting precompiling. Pkg.precompile throws errors and requests Pkg.build(“PyCall”) This then throws the erros below. Julia Version 1.7.0 Commit 3bf9d17731 (2021-11-30 12:…

---

## [Warning "Error requiring PyPlot from Plots" in compiled julia program](https://discourse.julialang.org/t/warning-error-requiring-pyplot-from-plots-in-compiled-julia-program/89857)

<div class="topic-metadata">

**Author:** [@clarakoehne](https://discourse.julialang.org/u/clarakoehne)\
**Replies:** 7\
**Last updated:** [November 8, 2022, 6:47pm UTC](https://discourse.julialang.org/t/warning-error-requiring-pyplot-from-plots-in-compiled-julia-program/89857 "2022-11-08T18:47:41Z")

</div>

Hi all! I am trying to compile my julia project using PackageCompiler v. 2.1.0. My julia version is 1.8.2, Plots is v. 1.35.8, PyCall 1.94.1 and, PyPlot 2.11.0. Compilation works, at least it doesn’t error in the middle.…

---

## [Show right y-axis using twinx() with Plots pyplot()](https://discourse.julialang.org/t/show-right-y-axis-using-twinx-with-plots-pyplot/30750)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 10\
**Last updated:** [November 1, 2022, 8:49pm UTC](https://discourse.julialang.org/t/show-right-y-axis-using-twinx-with-plots-pyplot/30750 "2022-11-01T20:49:43Z")

</div>

Hi, I am using twinx() to overlay 2 graphs with different y-axis, but only the y-axis on the left shows up in the plot. On the right, I only see numbers. Also, the y-label on the right gets cut out. Does anyone know ho…

---

## [Cannot build PyPlot](https://discourse.julialang.org/t/cannot-build-pyplot/87616)

<div class="topic-metadata">

**Author:** [@TimeValley](https://discourse.julialang.org/u/TimeValley)\
**Replies:** 2\
**Last updated:** [September 28, 2022, 2:32pm UTC](https://discourse.julialang.org/t/cannot-build-pyplot/87616 "2022-09-28T14:32:13Z")

</div>

Hello everyone, i just started programming julia and encountered a problem. When I added the PyPlot package and tried to build it: build PyPlot It gave those error messages: Error building \`PyCall\`, showing the last …

---

## [\`Plots.jl\` colorbar title position](https://discourse.julialang.org/t/plots-jl-colorbar-title-position/87663)

<div class="topic-metadata">

**Author:** [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)\
**Replies:** 2\
**Last updated:** [September 23, 2022, 9:49am UTC](https://discourse.julialang.org/t/plots-jl-colorbar-title-position/87663 "2022-09-23T09:49:13Z")

</div>

Consider with pyplot heatmap(1:10, 1:10, rand(10,10); cbar=:top, cbar\_title="TITLE", colorbar\_titlefontsize=40, colorbar\_titlefontcolor=:white) resulting in How can I make the title of the colorbar appea…

---

## [PyPlot.jl reduce white space after tight\_layout()](https://discourse.julialang.org/t/pyplot-jl-reduce-white-space-after-tight-layout/86923)

<div class="topic-metadata">

**Author:** [@sparrowhawk](https://discourse.julialang.org/u/sparrowhawk)\
**Replies:** 2\
**Last updated:** [September 21, 2022, 6:22am UTC](https://discourse.julialang.org/t/pyplot-jl-reduce-white-space-after-tight-layout/86923 "2022-09-21T06:22:08Z")

</div>

Can I reduce the amount of whitespace between subplots after the plot? Please note I need AA and BB to have linked X, Y axes and the same sizes with a shared colorbar, and that AA, BB and CC need to have a shared X axis…

---

## [Inline animation using PyPlot](https://discourse.julialang.org/t/inline-animation-using-pyplot/86992)

<div class="topic-metadata">

**Author:** [@KK\_JuliaNoob](https://discourse.julialang.org/u/KK_JuliaNoob)\
**Replies:** 0\
**Last updated:** [September 9, 2022, 2:23pm UTC](https://discourse.julialang.org/t/inline-animation-using-pyplot/86992 "2022-09-09T14:23:18Z")

</div>

Is there a simple example of using PyPlot to create animated SVG plots inline in a Jupyter notebook? Ideally, I’d like to do this without writing to a file first.

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