PyPlot Formatting

Hi,
can someone tell me how to format my plots in pyplot to get the numeration lines in the plot (like in the picture) and not outward? Also how do I make every 5th line longer? Is there a way to move the numeration of the y-axis to the right side, instead of the left?

Best,
Hannes

Try something like that:

using PyPlot

x = linspace(0,10,100)
y = rand(100)

figure()
plt[:minorticks_on]()
plot(x,y)
ax = gca()
ax[:tick_params](axis="both", direction="in", which="both", right="true", top="true")
ax[:tick_params](axis="y", which="major", length=10.0, labelleft="false", labelright="true")

And see also the Matplotlib documentation:
https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.tick_params.html

1 Like

Thank you! That actually helped a lot! After reading documentations and trying to set variables I came to the following result

Which is kind of cool, because its what I wanted. But to generate the table in the bottom, I had to make an empty subplot and plot text by trial and error to align it with the x-axis. Is there a more elegant solution like make a 4 smaller subplots with the same ticks, different text and delete the axes?

What if I’d like to add an Engineering notation to these plots. Let’s assume I want to use the ‘k’ or ‘M’ notation. In python I would use Engnotation. What command in julia? Pyplot doesn’t seem to support it.