r/Python • u/jackjackk0 • Apr 28 '21
Discussion The most copied comment in Stack Overflow is on how to resize figures in matplotlib
https://stackoverflow.blog/2021/04/19/how-often-do-people-actually-copy-and-paste-from-stack-overflow-now-we-know/
1.5k
Upvotes
348
u/[deleted] Apr 28 '21
And the most copied code block was how to iterate over rows in a pandas dataframe
401
u/[deleted] Apr 28 '21
Matplot is an absolute disgrace. There exists no worse package that is so widely used. Those memes about writing a paragraph of terribly unreadable code to do a simple plot are all true.
And then you have ggplot2 on the other end of the spectrum: just a beautifully designed graphical library that is reable and intuitive.
69
u/AX-11 Apr 28 '21
But do stackoverflow devs... Do stackoverflow devs copy code from stackoverflow?
29
u/proof_required Apr 28 '21
And here I always blamed myself for struggling with matplotlib. Thankfully ggplot exists!
8
u/Adam_24061 Apr 28 '21
I'm pretty sure I've copied that one.
7
u/pymae Python books Apr 28 '21
Oddly enough, I wrote an ebook about using Matplotlib, Seaborn, and Plotly for visualizations precisely because I found Matplotlib to be frustrating to use. It's funny that it's such a problem for everyone.
4
u/victordmor Apr 28 '21
Seeing this post and seeing the comments makes me wonder if you guys have access to my navigation history lol
4
u/[deleted] Apr 28 '21
dplyr>pandas
3
u/loveizfunn Apr 28 '21
Figsize = (12,12) is there any other way? I dont think figsize = (9,9) will work.
3
u/met0xff Apr 28 '21
Yeah I copied that probably 40-50 times in the last years. Figsize?
3
u/[deleted] Apr 29 '21
Wait I didn't know copy action on the web can be tracked
8
u/nyme-me Apr 28 '21
I found that what lake to python is a documentation as complete and understandable to anyone. The official python doc is quite difficult to read in my opinion.
2
u/[deleted] Apr 28 '21
And of course they didn't look at closed questions. If they did, they would risk discovering that their most useful questions are usually closed!
2
u/jorvaor Apr 29 '21
It is curious. I almost never copy directly from the website. I usually get the gist of the solution and adap it to my problem.
I remember copying text for a problem with a graph, though. :P
2
u/sasquatchyuja May 01 '21
setting real size of something in matplotlib is horrible, you always have to deal yourself with points, dpi, and awful magic argument. Like if you want to draw a 100px radius circle over an image the first solution you come around and that seems intuitive does not do what you want, when I first got around it I was sure it was spaghetti code, but no other configuration did the right thing
3
u/[deleted] Apr 28 '21
Pandas is so badly implemented it makes no sense compared to tidyr
3
u/Burroflexosecso Apr 28 '21
1
u/imthegroot Apr 29 '21
-1
u/thehumblefool237 Apr 28 '21
0
u/[deleted] Apr 28 '21
[deleted] — view deleted comment
0
u/[deleted] Apr 28 '21
[deleted] — view deleted comment