Julia alternatives to Matplotlib?

What makes you underline so insistently that Gadfly is 100% but not Makie? Compose’s ability to build SVG? All of Makie is pure Julia, except for the finals drawing backend, which can be OpenGL, Cairo, GR etc.

1 Like

In the sense that you can publish papers and/or get a grant on it.

Failing that, working on plotting libraries is pretty much a hobby project. Many fine things are, so this is not meant in a negative sense, it just makes it hard to justify expending a lot of effort on it, especially if alternatives already exist (as @ChrisRackauckas pointed out above).

2 Likes

No bro, at least with the default backend (GR) of Plots.jl, there’s no SVG output

That’s not true:

julia> using Plots

julia> plot(rand(10))

julia> savefig("random_plot.svg")

julia> Plots.backend()
Plots.GRBackend()  

(@v1.5) pkg> st -m Plots GR                                                                                                   
Status `C:\Users\ngudat\.julia\environments\v1.5\Manifest.toml`
  [28b8d3ca] GR v0.51.0 
  [91a5bcdd] Plots v1.6.0
5 Likes

I haven’t said anything about Makie. I just put up Gadfly as a possible alternative that fits the requirement. Feel free to contribute more alternatives…?

2 Likes

GMT, through GMT.jl, lets us virtually configure everything in a plot.

GMT certainly looks like a very extensive and powerful library. On the other hand, to me it also looks quite hard to use with a complex net of sub programs. The power to “configure everything” is not what I was talking about, almost every plotting tool has that. You can configure everything in matplotlib as well, but to get to good results you often just have to configure way too many things manually, especially with layouts.

2 Likes

In that case I should be covered. I meant to say that interactivity features are useful also for research.

subplot is very powerful with lots of nice defaults. What do you find more complicated in it than, Plots.jl, for example? E.g. this plots a 2x2 panels

subplot(grid=(2,2), panels_size=8, region=(0, 100, 0, 80), margins="5p", autolabel=true, col_axes=(bott=true,), row_axes=(left=true,), axes="wstr", name="panels.pdf")
        subplot(:set)
        basemap(region=(0,80,0,50))
        subplot(:set)
        plot([50 40], marker=:circle, mc=:red)
        subplot(:set)
        plot([50 40], marker=:square, mc=:green)
        subplot(:set, panel=(2,2))
        plot([50 40], marker=:star, mc=:blue)
subplot(:show)

I really don’t want to get into a comparison of layouting syntax or capabilities here, I was merely motivating why I work on a Julia-based plotting package if there are others out there

3 Likes

I’ll bite :smiley: :

dat = randn(200, 4) .* [1 2 3 4]
histogram(dat, layout = (2,2), link = :all)

Skærmbillede 2020-08-25 kl. 13.58.15

2 Likes

The issue is not that anyone is likely to hold you accountable in academia/research if you work a bit on plotting libraries. That’s how they most of them are actually written.

It’s just that you pay the opportunity cost of using that time for something for which you are actually rewarded, either directly or indirectly. Plotting software per se is financed in very rare cases, eg ggplot2 by RStudio.

I’m not disagreeing with that, I was just responding to this particular statement:

1 Like

I just renamed this topic from “Julia equivalent of Matplotlib?” to “Julia alternatives to Matplotlib?” which I think better expresses what I’m looking for, but invalidates some of the comments.

3 Likes

No worries, cache invalidation is a hard problem.

9 Likes

Not true if you use JuliaInterpreter, which is written in Julia but runs on two turtles and a sloth, neither of which is a programming language.

27 Likes

I was talking about the Output in Juno (Atom) or VS Code, the graphics is always displayed as PNG, there’s no reason to be rude. Also, my mistake was to not be clear about that.

I knew that it could be saved as SVG. Also, the documentation doesn’t explain very well.

OK, I could have made my example smaller but not a 2-liners :slight_smile:
… but it can play geo-tic-tac

subplot(grid="3x3", dims=(panels=(5,),divlines=(1,:dashed)), axes=(axes=:lrbt,), margins=0, savefig="tictactoe.png")
    coast(region=:global, proj=(name=:Ortho, center=(30 ,30)), land=:red, B=:g, panel=(1,1))
    coast(region=:global, proj=(name=:Ortho, center=(120,30)), land=:red, B=:g, panel=(2,2))
    coast(region=:global, proj=(name=:Ortho, center=(210,30)), land=:red, B=:g, panel=(3,3))
subplot(:show)

13 Likes

well played :slight_smile:

2 Likes

I also took your post to be about saving files, so perhaps you were not as clear as you intended. Regardless, even if you were perfectly clear, this kind of antagonism is completely unwarranted.

13 Likes

But mate, they started to make fun with my post. That is completely unwarranted too.

Well, now I’m “the bad guy” just to defend myself and clear things up.

Even that: ““the community feels it is offensive, abusive”” … Wow … Anyway, sorry community and don’t worry it’s better to be in silence. Peace for everyone and have a nice day :smiley:

I hope in the future Julia would have a powerful Plot Library as MatPlotLib :+1:t2: