# Newbie plotting frustration

**URL:** <https://discourse.julialang.org/t/newbie-plotting-frustration/126049>\
**Category:** New to Julia\
**Tags:** plotting, makie\
**Created:** [February 19, 2025, 2:17am UTC](https://discourse.julialang.org/t/newbie-plotting-frustration/126049 "2025-02-19T02:17:08Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwannetts](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dwannetts/32/219012_2.png) [@dwannetts](https://discourse.julialang.org/u/dwannetts)\
**Post date:** [February 19, 2025, 2:17am UTC](https://discourse.julialang.org/t/newbie-plotting-frustration/126049/1 "2025-02-19T02:17:08Z")

</div>

Hi All,  
I have been developing a significant level of frustration over the past few weeks. On one hand, Julia appears fast and able to deal with the data that I need to deal with, at least up to a point. Documentation and web search are great.

On the other, while modules such as `Plots`, `Makie` & `AlgebraOfGraphics` (to name three) can produce some spectacular output, I am yet to be able to produce something simple like a plot with Log10 axes with major ticks as powers of 10 and minor ticks correctly positioned (or at all …). Even being able to specify the locations of minor tick marks would be something. At least then I could roll my own plot.

And that’s before getting to the real goal of plotting +ve data as solid lines and -ve data as dashed lines. Kluges like `asinh` scaling seem not to work. And yes, I know that -ve Log10 is complex. That doesn’t help with measurements that have a large dynamic range and data polarity is significant.

Assuming I am not wasting my time pursuing this goal in Julia, is there a simple example or tutorial that anyone would like to suggest?

ManyTIA – D.

---

<div class="post-metadata">

**Author:** ![camilogarciabotero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/camilogarciabotero/32/35000_2.png) [@camilogarciabotero](https://discourse.julialang.org/u/camilogarciabotero)\
**Post date:** [February 19, 2025, 4:04am UTC](https://discourse.julialang.org/t/newbie-plotting-frustration/126049/2 "2025-02-19T04:04:38Z")

</div>

Hey there! I’ve also been exploring different plotting frameworks in Julia recently. Coming from `ggplot2`, the transition has been challenging, mainly because of how mature and well-integrated that ecosystem is. That said, [`TidierPlots.jl`](https://github.com/TidierOrg/TidierPlots.jl) has been improving a lot, and its documentation is getting better as well and could be a bridge between these two worlds.

On the other hand, I see [`AlgebraOfGraphics`](https://aog.makie.org/v0.9.3/) as a sort of _evolution_ of `ggplot2`, offering cleaner approach to data visualization IMHO. The documentation [recently received a major overhaul](https://aog.makie.org/v0.9.3/), making it much easier to get started. I also came across a somewhat hidden but useful [series of tutorials](https://tutorials.pumas.ai/html/PlottingInJulia/) on AoG that you might find helpful!

Also, remember to reach out the community or open an issue, people are usually keen to help.

---

<div class="post-metadata">

**Author:** ![dwannetts](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dwannetts/32/219012_2.png) [@dwannetts](https://discourse.julialang.org/u/dwannetts)\
**Post date:** [February 19, 2025, 4:52am UTC](https://discourse.julialang.org/t/newbie-plotting-frustration/126049/3 "2025-02-19T04:52:07Z")

</div>

Brilliant!  
Many thanks Camilo. It seems that I may have overlooked `TidierPlots` as one of the examples suggests that this module may be worthwhile pursuing.  
D.

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [February 19, 2025, 5:58am UTC](https://discourse.julialang.org/t/newbie-plotting-frustration/126049/4 "2025-02-19T05:58:51Z")

</div>

I mainly use PyPlot.jl . It allows you to use (nearly) the [Matplotlib](https://matplotlib.org/) syntax, which is well documented and feature rich.

For real-time 3D plots I use Makie.jl .

---

<div class="post-metadata">

**Author:** ![Maucejo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maucejo/32/39090_2.png) [@Maucejo](https://discourse.julialang.org/u/Maucejo)\
**Post date:** [February 19, 2025, 6:40am UTC](https://discourse.julialang.org/t/newbie-plotting-frustration/126049/5 "2025-02-19T06:40:31Z")

</div>

Honestly, having a matlab and python background, I found julia plotting packages easy to use. My goto package is `Makie.jl`. The documentation, associated to beauiful Makie, is really great.

And you can always post your questions here 😉

---

<div class="post-metadata">

**Author:** ![Tetrakai](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Post date:** [February 19, 2025, 6:47am UTC](https://discourse.julialang.org/t/newbie-plotting-frustration/126049/7 "2025-02-19T06:47:35Z")

</div>

I had a similar experience, maybe something like this:

```julia
plot(x, y;
     xscale = :log10,
     xticks = 10 .^ collect(0:ceil(log10(x))),
     minorticks = 10)

```

---

<div class="post-metadata">

**Author:** ![p-gw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/p-gw/32/210518_2.png) [@p-gw](https://discourse.julialang.org/u/p-gw)\
**Post date:** [February 19, 2025, 8:24am UTC](https://discourse.julialang.org/t/newbie-plotting-frustration/126049/8 "2025-02-19T08:24:15Z")

</div>

I also find Makie.jl to be my favourite plotting package in Julia.  
In a way it’s pretty similar to how base R plots work, but much easier to customize.

[https://beautiful.makie.org/](https://beautiful.makie.org/) has many examples - some of which also feature the log axes requested in the original post: [see here](https://beautiful.makie.org/dev/examples/2d/lines/line_xylog).

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [February 19, 2025, 8:39am UTC](https://discourse.julialang.org/t/newbie-plotting-frustration/126049/9 "2025-02-19T08:39:41Z")

</div>

> [@dwannetts](#):
>
> I am yet to be able to produce something simple like a plot with Log10 axes with major ticks as powers of 10 and minor ticks correctly positioned (or at all …). Even being able to specify the locations of minor tick marks would be something. At least then I could roll my own plot.

Here’s four different variants with Makie, same thing applies to AlgebraOfGraphics:

```julia
f = Figure()
scatter(f[1, 1], 1:100; axis = (;
    yscale = log10,
    yminorticksvisible = true,
    yminorticks = IntervalsBetween(10),
))
scatter(f[1, 2], 1:100; axis = (;
    yscale = log10,
    yminorticksvisible = true,
    yminorticks = IntervalsBetween(5),
))
scatter(f[2, 1], 1:100; axis = (;
    yscale = log10,
    yminorticksvisible = true,
    yticks = [1, 10, 100],
    yminorticks = IntervalsBetween(10),
))
scatter(f[2, 2], 1:100; axis = (;
    yscale = log10,
    yminorticksvisible = true,
    yticks = [1, 10, 100],
    yminorticks = [2, 5, 20, 50],
))
f

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/0/c0b19494315bfcbc6e653171c951a644d73d0ad0.png)

And without giving it a lot of thought, this `asinh` implementation looks fine at first glance, but you have to supply better ticks as no tick finder overload exists for this specific combination, yet.

```julia
scatter(-100:2:100; axis = (;
    yscale = ReversibleScale(
        asinh,
        sinh,
    ),
))

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/5/4/54a6eb5f6fb6a318293f7e7b73c7b58029bc1b83.png)

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [February 19, 2025, 8:41am UTC](https://discourse.julialang.org/t/newbie-plotting-frustration/126049/10 "2025-02-19T08:41:39Z")

</div>

Are logarithmic grid lines possible with Makie? Like this?

 ![image](https://global.discourse-cdn.com/julialang/original/3X/e/5/e5b222f7f809f50390afae794caf2622207038bc.png)

This was created with ControlPlots.jl which is based on PyPlot…

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [February 19, 2025, 8:44am UTC](https://discourse.julialang.org/t/newbie-plotting-frustration/126049/11 "2025-02-19T08:44:17Z")

</div>

Sure, they are just disabled in the default theme (my examples above had the AoG theme applied unintentionally):

```julia
f = Figure(Axis = (; yminorgridvisible = true, yminorgridcolor = :gray90))

scatter(f[1, 1], 1:100; axis = (;
    yscale = log10,
    yminorticksvisible = true,
    yminorticks = IntervalsBetween(10),
))
scatter(f[1, 2], 1:100; axis = (;
    yscale = log10,
    yminorticksvisible = true,
    yminorticks = IntervalsBetween(5),
))
scatter(f[2, 1], 1:100; axis = (;
    yscale = log10,
    yminorticksvisible = true,
    yticks = [1, 10, 100],
    yminorticks = IntervalsBetween(10),
))
scatter(f[2, 2], 1:100; axis = (;
    yscale = log10,
    yminorticksvisible = true,
    yticks = [1, 10, 100],
    yminorticks = [2, 5, 20, 50],
))
f

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/2/b2ff3d7d38ce627c91657be3761338bfa8db6ce1.png)

---

<div class="post-metadata">

**Author:** ![dwannetts](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dwannetts/32/219012_2.png) [@dwannetts](https://discourse.julialang.org/u/dwannetts)\
**Post date:** [February 19, 2025, 11:50pm UTC](https://discourse.julialang.org/t/newbie-plotting-frustration/126049/12 "2025-02-19T23:50:34Z")

</div>

Many thanks to all for contributing to this thread. I felt sure that such a simple problem had been solved, but just couldn’t see it in the array of seemingly different options.  
For the record, I’m coming from Mathematica where I’d use SciDraw to solve this problem.  
Also for the record, assuming `df_r` has been read & populated, the code

```julia
fig = Figure(; size=(1000, 300))
ax = Axis(fig[1, 1], 
    xlabel="Easting (m)", ylabel="Inphase (ppm)",
    yscale=log10,
    yminorticksvisible=true, yminorticks=IntervalsBetween(9),
    xtickformat = "{:.0f}", 
    xminorticksvisible=true, xminorticks=IntervalsBetween(9)
)
scatterlines!(df_r.Mid_E, ifelse.(df_r.FI_01 .> 0, abs.(df_r.FI_01), NaN); color=:blue, linestyle=:solid, markersize=0)
scatterlines!(df_r.Mid_E, abs.(df_r.FI_01); color=:blue, linestyle=:dash, markersize=0)
xlims!(418500,433500)
ylims!(.1, 10000)

fig

```

produces the desired panel which is

 ![test](https://global.discourse-cdn.com/julialang/original/3X/f/0/f081369b7714ba255c2b7b9fbb73a3135bf3a1b8.png)  
with labelling to be added.
