You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gives the following figure:
The x axis of this plot is of course too wide; but then, the following script aimed to solve the problem by fixing the x range eliminates the effect of aspect_ratio = :equal:
By inspecting the LaTeX code generated, the problem seems to be that heatmap, when asked to generate a figure with aspect_ratio = :equal, simply adjusts the scale of the x axis so that the main body of the heatmap becomes a square; but this is not what is intuitively expected: there is an axis equal image option for the axis environment in tikz, and, IMHO, this is what should be invoked when the aspect_ratio = :equal option is used.
Backends
This bug occurs on ( insert x below )
Backend
yes
no
untested
gr (default)
pythonplot
plotlyjs
pgfplotsx
x
unicodeplots
inspectdr
gaston
Versions
Plots.jl version: [91a5bcdd] Plots v1.36.1
Backend version (]st -m <backend(s)>): [8314cec4] PGFPlotsX v1.5.1
Output of versioninfo():
Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, tigerlake)
The text was updated successfully, but these errors were encountered:
I tried this and it seems for PGFPlotsX, it still doesn't work. The problem seems to be that the option axis_equal_image is added to the \addplot3 command in the generated LaTeX code, not the expected axis environment.
Details
When plotting heatmap with PGFPlotsX backend, I want to have aspect_ratio = 1. The following script
gives the following figure:
The x axis of this plot is of course too wide; but then, the following script aimed to solve the problem by fixing the x range eliminates the effect of
aspect_ratio = :equal
:By inspecting the LaTeX code generated, the problem seems to be that
heatmap
, when asked to generate a figure withaspect_ratio = :equal
, simply adjusts the scale of the x axis so that the main body of the heatmap becomes a square; but this is not what is intuitively expected: there is anaxis equal image
option for theaxis
environment in tikz, and, IMHO, this is what should be invoked when theaspect_ratio = :equal
option is used.Backends
This bug occurs on ( insert
x
below )Versions
Plots.jl version:
[91a5bcdd] Plots v1.36.1
Backend version (
]st -m <backend(s)>
):[8314cec4] PGFPlotsX v1.5.1
Output of
versioninfo()
:The text was updated successfully, but these errors were encountered: