matplotlib limitations and design flaws - matplotlib-devel - Matplotlib
matplotlib limitations and design flaws Development matplotlib-devel phillip.m.feldman February 10, 2016, 6:22am 1 Dear matplotlib developers (and users): I've expanded my web page "Python Limitations and Design Flaws" to include a good-size section on matplotlib (item number 3). The URL is as follows: http://phillipmfeldman.org/Python/Python_Limitations.html All feedback other than flames is welcome! Phillip -------------- next part -------------- An HTML attachment was scrubbed...
URL: < http://mail.python.org/pipermail/matplotlib-devel/attachments/20160209/ad73d939/attachment.html > ellisonbg February 10, 2016, 6:26am 2 Pull requests are welcome! ··· On Tue, Feb 9, 2016 at 10:22 PM, Phillip Feldman <phillip.m.feldman at gmail.com> wrote: Dear matplotlib developers (and users): I've expanded my web page "Python Limitations and Design Flaws" to include a good-size section on matplotlib (item number 3).
The URL is as follows: Python Limitations and Design Flaws All feedback other than flames is welcome! Phillip _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel at python.org Matplotlib-devel Info Page -- Brian E. Granger Associate Professor of Physics and Data Science Cal Poly State University, San Luis Obispo @ellisonbg on Twitter and GitHub bgranger at calpoly.edu and ellisonbg at gmail.com efiring February 10, 2016, 7:29am 3 Dear matplotlib developers (and users): I've expanded my web page "Python Limitations and Design Flaws" to include a good-size section on matplotlib (item number 3).
The URL is as follows: Python Limitations and Design Flaws All feedback other than flames is welcome! Regarding the polar plot, you are correct that there is an odd situation where angles are input in radians and labeled in degrees, but I think your description is incorrect. The inconsistency is entirely with the azimuth. The radial labels are labeling the radial coordinate, which has whatever dimensions are appropriate for the data at hand, unlike the azimuth, which is dimensionless.
The radial coordinate is correctly labeled with the numbers you supplied. Regarding the figure margin default: first, this presently applies only to the figure on screen, not to figures written to a file; and second, as soon as we get 2.0 out, the default will be for the margin to be white in both cases. Regarding the "Plot titles are by default jammed against...", I don't think this is true for the full set of defaults, so I don't know what is leading you to this conclusion; but a genuine weakness is that we lack a layout engine, so tweaking of the sort you suggest is indeed needed all too often.
Regarding the positional arguments to contour and contourf: yes, this is an unfortunate result of the initial design of the pylab interface to be close to Matlab, so as to make it easy for Matlab users to switch. Regarding your first point, "lack of uniformity among the interfaces": I think all of the developers would agree that this is a problem. It arose from matplotlib's organic growth, and we are gradually trying to address it.
Regarding your very first point, "Block Comments", I agree that it would be nice to be able to use C-style /* and */, for example, but I find the lack to be a very minor point. My workaround is to indent the block and insert the line "if False:" above it. Eric ··· On 2016/02/09 8:22 PM, Phillip Feldman wrote: Phillip _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel at python.org Matplotlib-devel Info Page ben.v.root February 10, 2016, 3:09pm 4 If I feel the need to have a block comment, I have learned that that usually means: 1) My logic is too complicated and needs to be cleaned up or broken up into smaller chuncks 2) That the comment might be better as a docstring And if I need to temporarily "comment out" a chunk of code, triple quoting works great. ··· On Wed, Feb 10, 2016 at 2:29 AM, Eric Firing <efiring at hawaii.edu> wrote: On 2016/02/09 8:22 PM, Phillip Feldman wrote: Dear matplotlib developers (and users): I've expanded my web page "Python Limitations and Design Flaws" to include a good-size section on matplotlib (item number 3).
The URL is as follows: Python Limitations and Design Flaws All feedback other than flames is welcome! Regarding the polar plot, you are correct that there is an odd situation where angles are input in radians and labeled in degrees, but I think your description is incorrect. The inconsistency is entirely with the azimuth. The radial labels are labeling the radial coordinate, which has whatever dimensions are appropriate for the data at hand, unlike the azimuth, which is dimensionless.
The radial coordinate is correctly labeled with the numbers you supplied. Regarding the figure margin default: first, this presently applies only to the figure on screen, not to figures written to a file; and second, as soon as we get 2.0 out, the default will be for the margin to be white in both cases. Regarding the "Plot titles are by default jammed against...", I don't think this is true for the full set of defaults, so I don't know what is leading you to this conclusion; but a genuine weakness is that we lack a layout engine, so tweaking of the sort you suggest is indeed needed all too often.
Regarding the positional arguments to contour and contourf: yes, this is an unfortunate result of the initial design of the pylab interface to be close to Matlab, so as to make it easy for Matlab users to switch. Regarding your first point, "lack of uniformity among the interfaces": I think all of the developers would agree that this is a problem. It arose from matplotlib's organic growth, and we are gradually trying to address it.
Regarding your very first point, "Block Comments", I agree that it would be nice to be able to use C-style /* and */, for example, but I find the lack to be a very minor point. My workaround is to indent the block and insert the line "if False:" above it. Eric Phillip _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel at python.org Matplotlib-devel Info Page _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel at python.org Matplotlib-devel Info Page -------------- next part -------------- An HTML attachment was scrubbed...
URL: < http://mail.python.org/pipermail/matplotlib-devel/attachments/20160210/6e597e26/attachment-0001.html> ; pmhobson February 10, 2016, 4:03pm 5 To add to that, thanks to modern text editors, languages don't need block comments any more. Ctrl + / should comment out a chunk of text on most editors that I've used (Save for e.g., vim). -p -------------- next part -------------- An HTML attachment was scrubbed... URL: < http://mail.python.org/pipermail/matplotlib-devel/attachments/20160210/f02da0e0/attachment.html> ; ··· On Wed, Feb 10, 2016 at 7:09 AM, Benjamin Root <ben.v.root at gmail.com> wrote: If I feel the need to have a block comment, I have learned that that usually means: 1) My logic is too complicated and needs to be cleaned up or broken up into smaller chuncks 2) That the comment might be better as a docstring And if I need to temporarily "comment out" a chunk of code, triple quoting works great. joferkington February 10, 2016, 4:41pm 6 Ctrl + / should comment out a chunk of text on most editors that I've used (Save for e.g., vim).
And it's pretty trivial to set up in vim (note that you'd tupically customize comment marker on a per-language basis through an autocmd function). This maps commenting out a block to "-" and uncommenting to "_": " Clear all comment markers (one rule for all languages) map _ :s/^\/\/\\|^--\\|^> \\|^[#"%!;]//<CR>:nohlsearch<CR> "Insert comment markers (assumes # unless overridden) map - :s/^/#/<CR>:nohlsearch<CR> There are also smarter options through various plugins, as well.
At any rate, block commenting isn't something I've ever missed or felt was a limitation in any way, though
The rest of this page is on the live site.