r/Python • • Aug 05 '19

Python's response to MATLAB

Post image
4.3k Upvotes

372 comments sorted by

View all comments

125

u/[deleted] Aug 05 '19

Why would matlab feel bad for python?

405

u/Alexanderdaawesome Aug 05 '19

Because Python needs to type

import numpy as np

Before doing anything MATLAB can do.

0

u/[deleted] Aug 05 '19

[deleted]

34

u/mexiKobe Aug 05 '19

matplotlib’s decision to include MATLAB-like state machine plotting was really stupid. It used to be extremely confusing and I would just write to file and use GNUplot

2

u/monkeybreath Ignoring PEP 8 Aug 05 '19

Isn’t that just if you use matplotlub.pyplot? The underlying API is stateless. The only time I’ve had a problem is with legend(), mostly because I haven’t looked up the underlying API, though I tend to creat the legend entries separately.

1

u/mexiKobe Aug 05 '19

Doesn’t everyone use pyplot?

There was also pylab. Like I said, it was/is confusing

2

u/skiguy0123 Aug 05 '19

3

u/mexiKobe Aug 05 '19

that was rhetorical.. I mean most people use pyplot and every intro matplotlib tutorial I’ve read uses it. The OO interface is the way to go though (or a better plotting package altogether)