[Matplotlib-users] Declarative interface to matplotlib

Ram Rachum ram at rachum.com
Sun Aug 23 13:39:40 EDT 2020


Hi everyone,

I'd like to ask you a general question, as someone who isn't very
experienced with matplotlib.

I noticed that matplotlib is very imperative, in contrast to declarative.
For example, I wanted to show an `imshow` plot with a colorbar, so I needed
to first create the plot, then run `plt.colorbar()`, then show the plot. In
more complicated plots, you could be doing 10+ actions one after another to
create a plot.

I would find a declarative interface to be much more elegant, i.e. one call
to create the plot and lots of keyword arguments, some of them nested, to
specify all the options. Of course, matplotlib being a very mature project,
the current interface must be maintained forever. But, do you know of any
such declarative interface to matplotlib? Either as part of the library, or
a separate library that uses matplotlib?

If such a thing doesn't exist, what would you think about adding one?


Thanks,
Ram.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20200823/d8a8327c/attachment.html>


More information about the Matplotlib-users mailing list