# PyPlot Formatting

**URL:** <https://discourse.julialang.org/t/pyplot-formatting/9601>\
**Category:** General Usage\
**Tags:** plotting, pyplot\
**Created:** [March 8, 2018, 4:55pm UTC](https://discourse.julialang.org/t/pyplot-formatting/9601 "2018-03-08T16:55:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Romero\_Azzalini](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/romero_azzalini/32/10325_2.png) [@Romero\_Azzalini](https://discourse.julialang.org/u/Romero_Azzalini)\
**Post date:** [March 8, 2018, 4:55pm UTC](https://discourse.julialang.org/t/pyplot-formatting/9601/1 "2018-03-08T16:55:24Z")

</div>

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

 ![20180307_184236](https://global.discourse-cdn.com/julialang/original/3X/9/5/95739a855d8e49e756c9fa667ae20b53c4660bb7.jpeg)

---

<div class="post-metadata">

**Author:** ![MLackner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mlackner/32/2789_2.png) [@MLackner](https://discourse.julialang.org/u/MLackner)\
**Post date:** [March 8, 2018, 8:48pm UTC](https://discourse.julialang.org/t/pyplot-formatting/9601/2 "2018-03-08T20:48:46Z")

</div>

Try something like that:

```julia
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](https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.tick_params.html)

---

<div class="post-metadata">

**Author:** ![Romero\_Azzalini](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/romero_azzalini/32/10325_2.png) [@Romero\_Azzalini](https://discourse.julialang.org/u/Romero_Azzalini)\
**Post date:** [March 9, 2018, 5:33pm UTC](https://discourse.julialang.org/t/pyplot-formatting/9601/3 "2018-03-09T17:33:43Z")

</div>

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

 ![download](https://global.discourse-cdn.com/julialang/original/3X/7/1/716e9552ae5bf96e91d460045c61c87e3eb82aaa.png)

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?

---

<div class="post-metadata">

**Author:** ![albz.uk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albz.uk/32/6219_2.png) [@albz.uk](https://discourse.julialang.org/u/albz.uk)\
**Post date:** [December 27, 2018, 1:33pm UTC](https://discourse.julialang.org/t/pyplot-formatting/9601/4 "2018-12-27T13:33:08Z")

</div>

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.
