this post was submitted on 04 Apr 2025
468 points (97.2% liked)

Science Memes

14251 readers
929 users here now

Welcome to c/science_memes @ Mander.xyz!

A place for majestic STEMLORD peacocking, as well as memes about the realities of working in a lab.



Rules

  1. Don't throw mud. Behave like an intellectual and remember the human.
  2. Keep it rooted (on topic).
  3. No spam.
  4. Infographics welcome, get schooled.

This is a science community. We use the Dawkins definition of meme.



Research Committee

Other Mander Communities

Science and Research

Biology and Life Sciences

Physical Sciences

Humanities and Social Sciences

Practical and Applied Sciences

Memes

Miscellaneous

founded 2 years ago
MODERATORS
 
top 41 comments
sorted by: hot top controversial new old
[–] originalfrozenbanana@lemm.ee 58 points 2 weeks ago (2 children)

Hot tip - export a basic plot to svg and format it in Inkscape. OBVIOUSLY DO NOT CHANGE ANYTHING THAT MODIFIES THE DATA OR RESULTS but it’s much easier to get a consistent look and feel in Inkscape than ggplot

[–] MTK@lemmy.world 50 points 2 weeks ago (1 children)

Hotter tip - just make it all in inkscape, no one fact-checks anyway!

[–] thevoidzero@lemmy.world 11 points 2 weeks ago

There's inkscape plugin to make barplots and piecharts. Why don't we add for more? Honestly we could even make it just take r code or python code.

both foss software, right?

[–] Waterdoc@lemmy.ca 34 points 2 weeks ago (1 children)

R with the tidyverse package is amazing once you get over the learning curve. It's so much easier to simply type a few lines of code then to fiddle with the Excel GUI, plus the ability to customize the plot is much, much better in R.

Yes making a simple plot in Excel is relatively easy, but try making something evening remotely complex and it's terrible. A box plot is a great example of this, 2 lines of plotting code in R for a basic plot but an absolute nightmare to create in Excel.

[–] Tar_alcaran@sh.itjust.works 10 points 2 weeks ago

Afaik, you can't even make a box plot on excel without 3rd party plugins. You can maybe hack together one with a bar chart, and hiding/narrowing parts of it so that it sort of resembles a box plot if you never ever open the data.

[–] SW42@lemmy.world 32 points 2 weeks ago (2 children)

Matplotlib and seaborn are my Go-to

[–] gigachad@sh.itjust.works 17 points 2 weeks ago (2 children)

Matplotlib is still a pain in the ass when you need to customize something seaborn can't handle

[–] Nikelui@lemmy.world 10 points 2 weeks ago

Matplotlib + export to SVG + final adjustments in Inkscape is my pick.

[–] Gebruikersnaam@lemmy.ml 5 points 2 weeks ago

Use plotnine if you want a ggplot-like API. Matplotlib is too low level for most stuff so it needs an abstraction layer such as plotnine or seaborn. Also, I understand the original devs desire to copy Matlab plotting standards, but that language is so bad.

[–] minyakcurry@monyet.cc 7 points 2 weeks ago

Valid. I remember being very frustrated with ggplot's documentation, only to realize they HARD CODED a plot parameter that could not be accessed. Matplotlib + Seaborn works fantastic, and I can do whatever I want without being babied by ggplot

[–] gandalf_der_12te@discuss.tchncs.de 23 points 1 week ago (1 children)

the reason to make plots programmatically is typically because you're already processing the data in python in ways that would have been too complicated if you'd do it in ~~excel~~ a table calculation program.

[–] BeardedGingerWonder@feddit.uk 4 points 1 week ago (1 children)

Dump it out as a CSV and import it to excel?

[–] gandalf_der_12te@discuss.tchncs.de 13 points 1 week ago (1 children)

that is manual labor each time you run the script, while plotting in python re-makes the plot automatically.

[–] BeardedGingerWonder@feddit.uk 3 points 1 week ago (1 children)

You could just automate the generation of the excel sheet as well - it's really just pick your poison.

[–] Themadbeagle@lemm.ee 12 points 1 week ago (1 children)

Having worked on a programs that automatically generate and process data from excel spreadsheets for a large company, I shuddered when you said that.

[–] BeardedGingerWonder@feddit.uk 4 points 1 week ago (1 children)

Oh my, no the other way round, spreadsheet loads the data and let excel handle it. I think you can probably even embed python at this point. I'm not seriously advocating for this approach either, to be clear.

[–] mitchty@lemmy.sdf.org 2 points 1 week ago

This doesn’t help with reproducibility much. In fact it would make it worse as now you’re throwing windows into the mix needlessly as well as implicitly depending on excel at a point in time. Let’s not introduce more non determinism when it isn’t needed.

[–] Thwompthwomp@lemmy.world 19 points 2 weeks ago

Oh this touches close to him. I got into pgfplots since it would generate plots in latex at compile time and keep fonts consistent, etc. plots looked amazing though.

The worst was when a colleague couldn’t get a pdf to upload into a google doc, so he just made an ugly ass bar chart in excel for the final draft since that was easier. The only reason he could do that so quickly was because he could read the data so easily from the plot I made. Ugh. Still burns

[–] klemptor@startrek.website 13 points 1 week ago

I got my ggplot2 book signed by Hadley at rstudioconf a few years back :)

[–] poinck@lemm.ee 9 points 2 weeks ago (1 children)

I rather use the r-base plot functions for everything in R. It is more flexible especially when you need to tweak the visuals.

[–] ProfessorPeregrine@reddthat.com 5 points 2 weeks ago

It can also be EXTREMELY long code to do something relatively simple. I bounce between base and ggplot, and use ggh4x for some oddly difficult stuff in ggplot.

[–] Geodad@lemm.ee 8 points 2 weeks ago

Why not just cut to the chase and do it in Libre Office Calc?

[–] snek_boi@lemmy.ml 7 points 2 weeks ago (2 children)

Honest question: do you think this could improve with practice? Or does the ggplot workflow necessarily makes it all slower?

[–] bjorney@lemmy.ca 22 points 2 weeks ago (1 children)

It absolutely improves with practice, and once you have settled on an aesthetic you like you can simply reuse the code, e.g. store all your color/line properties in a variable and just update each figure with that variable

My thesis had something like 30 figures, and at multiple points I had to do things like "put these all on a log scale instead" or "whoops, data on row 143,827 looks like it was transcribed wrong, need to fix it"

While setting everything up in ggplot took a couple hours, making those changes to 30 figures in ggplot took seconds, whereas it would have taken a monumental amount of time to do manually in excel

[–] snek_boi@lemmy.ml 1 points 1 week ago

Thanks for the reply! So Excel maybe is not as fast as the meme would suggest, I suppose.

[–] scrion@lemmy.world 11 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

Once you have figured it out, it's actually a nice workflow. Don't get me wrong, when I'm not publishing a paper, I quickly forget all commands, my whole setup etc. and start from scratch, cursing a lot and retracing my steps in the history, basically re-learning the framework. I'd still never move away from ggplot2.

[–] snek_boi@lemmy.ml 1 points 1 week ago

I agree with you. I love ggplot2. And I'm good at it. So it's my software of choice when doing data analysis and when making graphs.

However, I understand that there's an upfront cost to pay to use it: learning to code, tidying data, etc..

And beyond that, I don't really do data analysis with spreadsheet software like Excel or LibreCalc. So I don't know if a proficient LibreCalc user would be able to compete with a proficient ggplot2 user.

[–] veni_vedi_veni@lemmy.world 6 points 1 week ago (2 children)

Facet grid is a godsend, haven't seen anything like it in Excel. However, I will admit ggplot syntax and functionality is cryptic af, so I ask chatgpt for help and it's surprisingly accurate on this topic

Probably because there were so many questions about it on the forums

[–] blackbirdbiryani@lemmy.world 2 points 1 week ago

Ggplot syntax (and tidyverse syntax in general) is incredibly clear when you compare it to the alternatives. Just try to use plotly to do anything simple and it'll take 6x the time.

[–] Mavvik@lemmy.ca 6 points 2 weeks ago (1 children)
[–] cassowary@lemm.ee 3 points 2 weeks ago

There are dozens of us #JuliaGang

[–] Hupf@feddit.org 4 points 1 week ago

Back in my day, I used C to output plots in PostScript directly.

[–] anothercatgirl@lemmy.blahaj.zone 3 points 2 weeks ago (1 children)
[–] someacnt@sh.itjust.works 2 points 2 weeks ago (2 children)

I only know of gnuplot, how does ggplot differs from gnuplot?

Not sure, but here's a video of it working gnuplot sample video

[–] Hawk@lemmynsfw.com 1 points 1 week ago

Very different. Ggplot is for plotting data using a layered approach in R. Gnuplot is more like a plotting toolkit in itself.

Ggplot looks better with less effort typically. It's comparable to seaborn.

[–] Kyle_The_G@lemmy.world 3 points 2 weeks ago

graphpad is my #1

[–] ftbd@feddit.org 2 points 2 weeks ago

I've never seen a 'publication quality' plot that fits into the document as well as a tikz/pgf plot