improving mpl docs and accessibility for API users · Issue #524 · matplotlib/matplotlib · GitHub
Skip to content

improving mpl docs and accessibility for API users #524

Closed

Description

@jdh2358

There was a recent discussion on the numpy mailing list about how to improve the accessibility of the docs and the gallery, particularly for API users who find the pylpot state-machine annoying. Add your suggestions and gripes here.

Activity

  1. josef-pkt commented on Oct 13, 2011

    @josef-pkt

    My main problem with the docs is that the sourceforge html documentation is too slow for fast browsing, especially for cross-linked information. I often wished I had an htmlhelp or a local copy of the build docs.

    Browsing would be much faster, and it's possible just to bookmark or add to favorites the juicy parts.tt

    My last attempt to build the docs on Windows, version 98.1, I think just ended in C++ error messages. I haven't tried since.

    Positive, I like the examples and gallery a lot, but sometimes I end up just browsing the examples source folder instead of the online docs.

  2. jdh2358 commented on Oct 13, 2011

    @jdh2358
    CollaboratorAuthor

    Josef -- this is a good suggestion and an easy one to implement. I uploaded a zip file matplotlib_html.zip of the mpl web site to https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0. It's a large file because it contains all the images, but you can download it, unzip it, and click on index.html to browse the docs locally.

  3. josef-pkt commented on Oct 14, 2011

    @josef-pkt

    Thanks John, works nicely. and fast. (It's better to have one download than waiting 50 or 100 times for the same gallery page to load online.)

  4. tonysyu commented on Oct 14, 2011

    @tonysyu
    Contributor

    One of the big advantages of matplotlib is that it's incredibly customizable. On the flip side, this leads to a lot of object attributes, which makes introspection more difficult. One way to reduce this difficulty is to reduce the number of attributes using properties (instead of setters and getters).

    Unfortunately, this will probably be difficult to implement because, IIRC, the doc generation is somehow tied to having separate setters and getters.

  5. tonysyu commented on Oct 14, 2011

    @tonysyu
    Contributor

    This is somewhat related to my setter/getter comment above.

    It's a bit confusing that some functions in pyplot have mirrored axes methods but with different call signatures---e.g. plt.xlim mirrors ax.set_xlim. This comment is a little different than the above b/c it could be fixed by simply adding a property, without removing the setter/getter. (Of course, that just adds to the number of methods/attributes, which as discussed above, has its own difficulties).

    In addition, there are functions in axes objects that mirror the name of pyplot functions, but don't behave the same. For example, plt.title behaves the same as ax.set_title, but there's also ax.title, which is completely different. ax.title should actually be a private attribute in this case, since you probably wouldn't want to set it directly (because it's a text object instead of simple string).

    These changes would make it easier to learn the OO interface after learning the state-machine interface.

  6. ivanov commented on Jun 8, 2012

    @ivanov
    Member

    I wanted to cross-link #362, which had some criticisms, and #714 which was one approach toward something better.

    Also, as a possible source of inspiration, look at some of the examples in the Grace gallery, in particular, we already have some stuff like this
    axes example

    and this

    props exampe but pulling that into (or at least referencing from) the actual API would be very useful.

    Another idea would be to provide an example where all of "standard" are mouse pick-able, and upon being selected, they spit back to you their class. (I'm just trying to think of an interactive way to solve the "I don't know how to modify an element until I know how to call it, and it's pretty non-trivial to know that a spine is called a spine, though it is documented). Not sure how feasible this last point is.

  7. WeatherGod commented on Jun 9, 2012

    @WeatherGod
    Member

    For SciPy 2012, I was planning to use mpl to create an SVG plot with
    likable components called "anatomy of a matplotlib plot". This is probably
    what you are thinking of?

  8. pelson commented on Oct 18, 2012

    @pelson
    Member

    @WeatherGod : Did you ever manage to do this? Sound great!

  9. pelson commented on Oct 18, 2012

    @pelson
    Member

    Further things which should be considered can be found in #362 (I closed that issue in favour of this one).

  10. WeatherGod commented on Oct 22, 2012

    @WeatherGod
    Member

    @pelson, no, my presentation wasn't accepted, so I had no time allocated to it.

  11. endolith commented on Apr 11, 2014

    @endolith
    Contributor

    Coming from Matlab, I'm happy that the examples are in a Matlab-like format, making it easy to get stuff working fast, and then slowly learn the more object-oriented approach as you use it.

    It would be great if there were side-by-side examples showing how to do something the state machine matlab way and how to do the exact same thing the pythonic object-oriented way. Maybe some gallery examples, or maybe a page like http://wiki.scipy.org/NumPy_for_Matlab_Users with 3 columns: matlab, matlab-like matplotlib, pythonic matplotlib.

  12. petehuang commented on Dec 28, 2016

    @petehuang
    Contributor

    Hi,

    This issue has been inactive for a while. What is the current state of documentation relative to the original prompt in 2011?

  13. tacaswell commented on Dec 29, 2016

    @tacaswell
    Member

    Better, but still in need of lots of work.

    #7205 is a tracking issue for fixing the docstrings

    MEP12 (http://matplotlib.org/devel/MEP/MEP12.html) is guidelines for improving the examples #7206 is tracking some of this.

  14. modified the milestones: , on Sep 24, 2017
  15. modified the milestones: , on Oct 9, 2017
  16. anntzer commented on Jan 11, 2018

    @anntzer
    Contributor

    I don't think keeping this open really helps anything (there are enough issues tracking docs improvements at that point...). Feel free to reopen if you disagree.

  17. modified the milestones: , v2.2.0 on Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions