Problem visualizing x-axis' ticks on a plot

Hi everyone,

I am plotting a graph by using:

using Plots
pyplot()
...

And I obtain the following:

Which is fine, apart from how the x-axis ticks are displayed.
What can that be due to? Maybe too large values? The values in the x-axis should be in the range 10^5 or 10^6.

Do you have any suggestions in order to visualize the x-axis ticks correctly?

Thanks in advance!

What do you expect to see? Is your question about the error in rendering the exponents on the x-axis? Or do you think you should have different values on the x-axis?

It’s hard to help here, it’d be great if you could provide a full MWE as described here and explain what you’re hoping to see on your plot.

1 Like

@nilshg thank you for your reply, and you are right, I should have included more details, please refer to the following.
My question was about the error in rendering the exponents on the x-axis. I would expect to see integers, or e.g. 10^4, 2*10^4, etc.; but not a square instead of the exponents.

The structure of the code is the following:

using Plots
pyplot()

wanted_font = "garamond"
fig_1 = plot(
tickfont  = wanted_font, legendfont = wanted_font, guidefont = font(9, wanted_font),
xlabel    = "My x-axis", ylabel    = "My y-axis",
legend    = false, grid      = false,
xmin      = 0, ymin      = 0
)

while # a certain complicated condition ...
        plot!(fig_1,
        [scalar_1], [scalar_2],
        c = [1],
        marker = (:circle, 1),
        markerstrokewidth = 0.1
        )
end
savefig(fig_1,"name.jld")

By the way, I’m using Julia 0.6.4.
Thank you in advance!

The exponents are rendered using Unicode superscript, and I’m not sure if Garamond supports those. Maybe try a font which does? I think Noto should (for one).

2 Likes

@asinghvi17 thanks very much, this works!
Changing the font solved the problem!