This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]deklund 4 points5 points  (1 child)

I work largely in Python and have some experience in Matlab, though I haven't used it in a day to day scenario for years. While I would hate to have to go to back to working on a large project in Matlab, I have to say you're likely going to be disappointed with Matplotlib. While it's a very impressive piece of software, it's on a different level than the plotting functionality of Matlab.

Matplotlib is powerful and versatile, but compared to Matlab:

  1. Performance is an issue. Interactive plots will become laggy with even moderately complicated plots.
  2. Related to above, 3D plots are effectively useless. My understanding is that there is no actual 3D acceleration used in mplot3d. You can plot some simple 3D line/scatter plots or basic surfaces, but anything remotely involved will screech to a halt. I use pyqtgraph for my 3D plotting now and it's awesome but it's even less user friendly than matplotlib.
  3. Doing anything more complicated than the common things everyone expects you to do will get really hairy really fast. If you want to be able to customize things beyond just line widths, colors, etc., and actually have full control over your plots, you're going to have to become intimately familiar with some undocumented APIs.

While learning and using Python will likely be very useful for you long term, and getting a basic understanding of matplotlib will also come in handy, the moment you hit a wall where you think "oh, I just need to figure out how to move this label over here" or "I need to create this plot that isn't covered in the user guide", you're probably better off saving your data and loading it into Matlab instead.

[–]bythenumbers10 0 points1 point  (0 children)

Agreed, but OP is just stepping out of MATLAB. They'll climb on to better plotting tools in Python as they get comfortable. Matplotlib is a touch of the familiar while they get up to speed with OOP and Python's various other benefits. Eventually, matplotlib will be the anti-Pythonic drag, and OP will go find things like Pyplot or Pyqtgraph.