Add in 21.Jan.
people are trying to tell me the style can be customized, but no one explains why the default style is not pretty at all.
And if you think the default is pretty just say it’s pretty. Don’t tell me that it can be customized, because customization doesn’t conflict with pretty default plotting.
Just look at one example in matplotlib, I produced in julia. Why did the developers choose to make the default figure like this?
I mean, the one from matplotlib looks much better for publication, right?
I think it’s somewhat subjective. I myself don’t prefer Plots.jl nor pyplot but use Gnuplot.jl for all my plotting (plus it’s really powerful with a lot of features and basically no FTTP issue).
To answer your question directly, perhaps within Plots.jl there could be user-specific defaults setup (so in your case for example, the mirrored axis will go away).
It took me a while to get the basics (and I still mostly have to google it). There is a Julia friend wrapper around Gnuplot (check out Home · Gaston.jl (mbaz.github.io) but as far as I know, it still dosn’t hook into the Plots.jl interface.
Don’t let me derail the conversation. Perhaps someone from Plots.jl can provide a comment on why certain defaults were chosen.
Matplotlib main advantage in your example is that it automatically places the legend away from the data. Plots.jl could default to place the legend outside the plot area.
Plots.jl’s default discrete light gray grid lines in the background are very useful to make the values easier to read. For example, we know that the quadratic reads 4 at x=2.
I really want to know why some features are chosen. In the presented example, I think adding box=:off , grid=:off, legend=:topleft, background_color_legend=nothing makes the figure looks slightly better. But I think the thing makes the figure of matplotlib more elegant is maybe the transparent background of legend and the font size.
Yes, most of the things are personal preference, I fully agree. Also the choice of plotting library is quite a controversially topic in the Julia community. You ask 10 people and get 15 different answers I love and prefer PGFPlotsX.jl because that’s in my opinion the most mature and best documented feature-rich plotting library which produces publication-quality graphics (TeX). But as written above, whatever you like
However, regarding the colours, there is one important thing: there are many colour blind people, so choose colours which are distinctive for the majority of the people.
Luckily, the default colours nowadays are pretty good, see below (if you don’t see a difference, you probably have deuteranomaly), the examples created with Coblis — Color Blindness Simulator – Colblindor
at the start of a script. If it’s important, I will also spend a little time choosing a good color scheme for my specific use case. But I’m not pretentious enough to think everyone shares my preferences.
The defaults are fine and the options are numerous.
I’d frequently used Plots.jl with the PGFPlots backend to produce figure with publication quality far superior to what matplotlib produces. You can use matplotlib2tikz for similar output, but matplotlib doesn’t really produce close to publication-quality figures out of the box in my opinion.
But my point is that the default plot from Plots.jl clearly doesn’t look like something for publication.
I cannot even put the default plot figures for the presentation to my supervisor. But I can accept to put the figure from matplotlib in the slides to my supervisor.
I agree with some points - eg the legend autoplacement in Plots.jl can indeed be improved to avoid lines. But at least some of those differences are definitely a matter of preferences. For example I always put grids on my plots, and have the corresponding option set in matplotlib config.
The fact is that the diversity of possible inputs is so great that it is probably difficult to optimize it in all cases and for quality publications we have to adapt to the dataset in hand. Probably the defaults are defined for quick display (no oversampling done for functions input as above, etc.)
I’m not sure the question can be answered in a meaningful way. Your preferences are likely different than mine which are different than the next person. The authors of the plotting packages get to decide what the defaults are - I think that is reasonable.