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
When using any non-default fonts available in the GR framework with the plot function, the negative signs (-) in the tick labels on both the x and y axes are incorrectly displayed as question marks (?). This issue occurs specifically when saving plots as PDF files. Saving the same plots as PNG files shows the negative signs correctly, indicating that the issue is isolated to PDF outputs.
Steps to Reproduce
Install and load the Plots package.
Set gr() as the backend.
Execute the following plotting commands using various non-default fonts:
using Plots
gr()
plot(-4:4, -5:3; fontfamily="Palatino Roman") # Change font as neededxlabel!("-x")
ylabel!("-y")
savefig("x.pdf") # Save as PDF and observe the issuesavefig("x.png") # Save as PNG for comparison
Open both x.pdf and x.png to view the results.
Expected Result
The tick labels with negative numbers should correctly display the negative sign in both PDF and PNG outputs.
Actual Result
In PDF outputs, the negative signs in the tick labels are replaced with question marks (?). In PNG outputs, the negative signs are displayed correctly.
Backends
This bug occurs on ( insert x below )
Backend
yes
no
untested
gr (default)
x
pythonplot
plotlyjs
pgfplotsx
unicodeplots
inspectdr
gaston
Versions
Plots.jl version: v1.40.4
Backend version (]st -m <backend(s)>): v0.73.5
Output of versioninfo():
Julia Version 1.10.3
Commit 0b4590a5507 (2024-04-30 10:59 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin22.4.0)
CPU: 10 × Apple M1 Pro
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
The text was updated successfully, but these errors were encountered:
Details
When using any non-default fonts available in the GR framework with the
plot
function, the negative signs (-
) in the tick labels on both the x and y axes are incorrectly displayed as question marks (?
). This issue occurs specifically when saving plots as PDF files. Saving the same plots as PNG files shows the negative signs correctly, indicating that the issue is isolated to PDF outputs.Steps to Reproduce
Plots
package.gr()
as the backend.x.pdf
andx.png
to view the results.Expected Result
The tick labels with negative numbers should correctly display the negative sign in both PDF and PNG outputs.
Actual Result
In PDF outputs, the negative signs in the tick labels are replaced with question marks (
?
). In PNG outputs, the negative signs are displayed correctly.Backends
This bug occurs on ( insert
x
below )x
Versions
Plots.jl version:
v1.40.4
Backend version (
]st -m <backend(s)>
):v0.73.5
Output of
versioninfo()
:The text was updated successfully, but these errors were encountered: