Why do people think Plots doesn't produce publication-quality figure?

in the previous thread I complained about the default plot style of Plots is not good (Why Plots.jl produce figures looks not as good as other packages even with pyplot)
Then I received some people lecturing me about the default being good enough.
But, some people said they just don’t use Plots/PyPlot to produce the publication-quality figures. Instead, they use PGFPlots, Gnuplot, etc. I am confused because I found that matplotlib “Create publication quality plots.” in their main page. Also, GR can be used as the backend of matplotlib.

So can someone explain to me what is the difference of figure qualities between those packages? BTW, I used some settings and get the figure posted here. I feel the style is suitable for publication (even if some data was covered by legend) and I used Plots.jl with GR backend. The default settings are:

default(grid=:off, box=:on, legend_background_color=ARGB(1.0,1.0,1.0,0.5), 
legend_foreground_color=:gray,   markerstrokecolor=nothing, 
markerstrokewidth=0, markersize=5, legendfontsize = 9, tickfontsize=9, 
guidefontsize=12, fontfamily="Computer Modern")

and the code plotted this figure is

a = range(0, 2, length=100)
plot(a, a, label="linear", lw=2, xlabel="x label", ylabel="y label",
 title = "Simple plot", dpi=600, size=(500, 270))
plot!(a, a.^2, label = "quadratic", lw=2)
plot!(a, a.^3, label="cubic", lw=2)

image

I think it can be quite subjective, what is a nice looking plot and what is not.

Personally I want everything to look like “LaTeX”, so I do not wish to use defaults Plots etc. for publication. Does it mean it cannot be used? Of course not, again everyone has a personal preference depending on their use cases.

For me personally the plot you made does not look publication ready. I would want a minor grid, legend outside of plot, perhaps a different font and so forth.

It is not really important which plotting package you choose as long as you can convey the relevant information with it in a clear manner.

That is my take atleast.

Kind regards

6 Likes

Thanks for the answer.
I think I should delete some of this post so people can notice the question is actually what is the difference of figure qualities between packages? ^-^

1 Like

This post isn’t much different from the previous post. You’re still trying put different approaches in a rigid ranking of quality, but quality is largely subjective and depends a lot on the user’s requirements and habits. You could ask 100 people this question, get 100 different answers, and most of them can easily be right. I’m not sure if such a thread would be productive, the merits of a plotting library are usually learned by studying code and visual examples, not from reading a user’s paragraph-long recommendation.

I will point out that customizability is the commonality. It would indeed be nice for the stars to perfectly align to create a set of plotting functions with the perfect defaults for all your data. In reality, there’s always going to be many tweaks that can present the data more clearly, and any “publication-quality” plotting library will try to let you do those. Just look at the 3rd bullet point in that screenshot introducing Matplotlib. When those people told you the “defaults were good enough”, they meant the defaults were good enough as defaults; customization is still typical.

2 Likes

did you see this sentence?

So can someone explain to me what is the difference of figure qualities between those packages?

In Julia, Plots is the default go-to package. Almost inevitably you’ll need to customize your plots for publication. In Python matplotlib is a package intended for extreme customization, so you’re not comparing like with like. If you compare Julia’s Plots with R’s default plot, you’ll see that Julia does a much better job. You can call PyPlots in Julia and if there are missing functionalities, you could post an issue on their Github page. I don’t see much else to add. Please refrain from posting the same thing over and over.

1 Like

I posted this because no one answered the quesiton. Like you. you seem replied but didn’t answer the question itself.

Do you know the question in this post and did you see this sentence?

So can someone explain to me what is the difference of figure qualities between those packages?

Please try to stay courteous in your discussions. You may indeed assume that responders are literate and spent time reading through your entire post.

8 Likes

But you didn’t even answer the question in the title. lol
You read only what you want to read.
If you don’t want to spend time, why did you answer?

It isn’t clear why you are aggressively responding. What is your dog in the fight?

As was already mentioned in this thread, and in many threads before this, plotting is mostly about preferences rather than functionality.

8 Likes

I think you give an answer at least close to what I would like to discuss. A lot of people are just telling Plots.jl can be customized, but not why the default is like this.
The question of this post is so clearly titled, but some people kept avoiding it.

I found someone is not courteous so I tried to reply to them the same way they replied.

BTW I am offended by your reply.

If you want to be pedantic, Plots.jl does not produce any plots. It is only a front-end package that provides access to many different backends for plotting. So is your question about the backends or the defaults that are set by Plots.jl?

2 Likes

You’re not getting the answers you want, that’s clear. But it’s not because people can’t read or don’t care to, it’s because they disagree with the premise of your questions and have explained why. You shouldn’t misconstrue disagreement as offense, and you shouldn’t try to retaliate. If you don’t think a response answers your question, you don’t have to call it out or respond to it at all. This forum is full of comments that aren’t solutions, it’s not grounds for conflict.

3 Likes

I explained this in this post but I feel I should explain to you again.

In the previous post, some people told me they use Plots.jl only to have a first look of the data but don’t use Plots.jl or Pyplot to produce figures for publication. Instead they used PGFPlots or GUNplots.
So the question is, what makes people think Plots.jl doesn’t produce publication-quality figures.

To add for discussion, if it’s not because Plots.jl is not capable, then what makes people to use other packages instead? Or it’s just they are used to those tools?

Disagree about what? I didn’t see many people say straightly the default is nice enough in the previous post. They kept explaining that the style can be customized. However, customization doesn’t conflict with a good first look. If everyone has to customize the default, it means it is really not good-looking. I think @tbeason made a relatively good answer if the default is really from the efficiency point of view.
Once again, customization is not the answer for why the default is not good-looking.

And in this post, it’s another topic. I explained that some people told me they don’t use Plots.jl for publication. And no one, no one posted something saying he/she thinks Plots.jl produces figures for publication. Your first reply is answering the previous post.
Actually, I gave an example that I think is OK for publication. Or are you disagree with that I think Plots.jl can produce publication-quality figures?

BTW, do you think “What is your dog in the fight?” is good talk?

Linking this related thread

2 Likes

Hi,

I’m a scientist (biophysics), and recently started trying to convert from MATLAB to Julia for most of my work - first plots featuring in a paper out late last year (MR - Analysis of conformational exchange processes using methyl-TROSY-based Hahn echo measurements of quadruple-quantum relaxation). Whether using MATLAB or Julia, I always need to tweak figures in Illustrator afterwards, but there’s a lot Julia could do to make this a much easier job. I can make a few (non-comprehensive) comments about what I find difficult in making ‘publication quality’ figures in Julia (Plots.jl):

  • pdf export - this almost goes without saying, and is generally not a problem, but heatmaps sometimes don’t render correctly on Macs using Preview (same issue in MATLAB, antialiasing blurs things together)
  • figure and font sizing - it’s an absolute requirement to submit figures that are precisely sized (in mm) and have defined font sizes.
  • fonts - always Helvetica, and it should be easy to set this uniformly. I can’t think of any circumstance I’d want to set axis guides, numbers, legends, titles separately - that’s just weird and having to do it is irritating.
  • greek letters in Helvetica - they don’t render properly, so I have to re-type them in Illustrator or use a different font and change this later in Illustrator
  • marker size - appropriate for the plot size, or at least scaling easily adjusted
  • editable pdfs - no weird grouping, or outlined text - invariably I need to tweak some bits and pieces, so please make it easy! Plots sometimes produces a mess of clipping masks
  • data out of the axis limits - this is just clipped rather than removed, and can make file sizes enormous and further editing really difficult.
  • uniform stroke width - journals insist on 0.5 point everywhere - axes, lines, symbols, error bars (Measurements.jl)
  • legends - symbols and font sizes have different sizes from the main plot, so I have to edit these manually afterwards
  • all blacks should be the same colour, not slightly different shades of dark grey
  • axis guides - often appear outside plot limits and get cut off
  • margins - invariably have to re-jig these manually in Illustrator, particularly with subplots, due to incorrect or inappropriate spacing, labels getting cut off, or elements overlapping between neighbouring panels.
  • sub plots - would be helpful to place labels (a), (b) etc.
  • bar plots - labels get automatically sorted into alphabetical order - have wasted so much time trying to fix this one, or just re-labeling manually in Illustrator
  • log scales are unusable currently - ticks are not calculated appropriately, often only one or two tick marks are shown.

PS. don’t get me wrong - I’ve loved the switch from MATLAB to Julia, and appreciate all the work that’s going into it - but hope the list above might help in at least giving one scientist’s perspective.

11 Likes

This doesn’t seem to be going anywhere good (three flagged posts) and I don’t really feel like doing any active moderation (like reading the thread to try to figure out what to do) on a Saturday night, so I’m just going to lock it until someone has the time and energy.

9 Likes

I’ve been trying to bring myself to have the energy to review this thread or wait until another moderator does it, but no one has and I still don’t, so I’m going to leave it closed with a comment that the attitude of this thread seems intentionally provocative and denigrates the hard work of maintainers of plotting packages you get to use for free. If you have specific constructive suggestions, great, make them on discourse or even better, on GitHub. Starting a thread asking why something doesn’t meet your vague entirely opinion based standards with an implication that it’s because someone else is making an intentional choice to make things worse is just being a jerk. Don’t do that.

18 Likes