# PythonPlot: use imshow instead of pcolormesh for heatmaps

**URL:** <https://discourse.julialang.org/t/pythonplot-use-imshow-instead-of-pcolormesh-for-heatmaps/118217>\
**Category:** General Usage\
**Tags:** plotting, pythonplot\
**Created:** [August 15, 2024, 9:16am UTC](https://discourse.julialang.org/t/pythonplot-use-imshow-instead-of-pcolormesh-for-heatmaps/118217 "2024-08-15T09:16:14Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [August 15, 2024, 11:58am UTC](https://discourse.julialang.org/t/pythonplot-use-imshow-instead-of-pcolormesh-for-heatmaps/118217/5 "2024-08-15T11:58:26Z")

</div>

Your options seem to be for SVG output these backends with Plots.jl:

[https://docs.juliaplots.org/latest/output/](https://docs.juliaplots.org/latest/output/)

> gr, inspectdr, pgfplotsx, plotlyjs, pythonplot, gaston

You seem to be looking for a workaround for matplotlib, i.e. PythonPlot:  
[https://docs.juliaplots.org/stable/backends/#At-a-glance](https://docs.juliaplots.org/stable/backends/#At-a-glance)

As mentioned you can use PNG not just SVG with it or most backends:

> [@CairoMakie - SVG export options](https://discourse.julialang.org/t/cairomakie-svg-export-options/90348):
>
> Hi all, when saving Makie plots as svg, all text is converted to curves (i am using Arial font in case that matters). I would like to have the text as actual text instead so that it is easier to edit later on using other programs. Is this possible? I couldn’t find an applicable setting in CairoMakie. The only options I found [in the docs](https://docs.makie.org/stable/documentation/backends/cairomakie/) were for partial rasterization or overall scaling of the output. I know that Plots.jl exports text as text as long as the font is not missing [[link]](https://discourse.julialang.org/t/plots-export-to-svg-with-text-converted-to-shape/47420), and in m…

I doubt SVG can be made fast, it’s just inherently scales linearally to be slower, with more points, or even if there’s some workaround, PlythonPlot (and PyPlot) are limited to what matplotlib does (I suppose they support all the features).

Have you thought of using not just a different backend for Plots, rather use Makie? I think it’s going to be the future of Julia plotting, if not already. It has it’s own backends.

> **[heatmap | Makie](https://docs.makie.org/stable/reference/plots/heatmap)**
>
> Create impressive data visualizations with Makie, the plotting ecosystem for the Julia language. Build aesthetic plots with beautiful customizable themes, control every last detail of publication quality vector graphics, assemble complex layouts and...

I understand the tidier ecosystem is very nice (a go-to by now for people over using DataFrames directly, and not just from people coming from R), and it has:

> **[GitHub - TidierOrg/TidierPlots.jl: Tidier data visualization in Julia, modeled after...](https://github.com/TidierOrg/TidierPlots.jl)**
>
> Tidier data visualization in Julia, modeled after the ggplot2 R package.

It uses Makie as its plotting package.

> [@maltee1](#):
>
> My current workaround is to plot using both pythonplot and gr

What do you even mean? Different plots, or same plot with both, and editing into one by hand? That seems unworkable, not a scalable solution, if you need to regenerate the plots at least. I at least thought with Plots.jl you choose just one backend, but I suppose you can switch dynamically if it suits you, it’s just seems like a giant hack to be avoided what you are doing.

---

_[View the full topic](https://discourse.julialang.org/t/pythonplot-use-imshow-instead-of-pcolormesh-for-heatmaps/118217)._
