[Matplotlib-users] Why the V parameter in matplotlib.axes.Axes.contour must be increasing?

Benjamin Root ben.v.root at gmail.com
Wed Aug 16 09:49:46 EDT 2017


Probably because nobody noticed that discrepancy before. I'd imagine it
would be fairly simple to apply a sort to the list of values within the
function itself. The underlying contouring implementation assumes a
monotonically increasing set of contour levels, and I would imagine that
MATLAB's version does too -- just that they sort the contour levels for you.

At the moment, I don't see any reason why we couldn't do that, too.

Cheers!
Ben Root


On Wed, Aug 16, 2017 at 8:33 AM, Xi Shen <davidshen84 at gmail.com> wrote:

> Hi,
>
> https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.contour.html says
> the contour function accept a vector parameter V which must be in
> increasing value. But the contour function in MATLAB does not have this
> restriction.
>
> I understand the underlining implementation of these two functions could
> be very different. I want to understand what is the purpose of this
> restriction, and if it possible to create a contour image the same as
> MATLAB does by using contour with V = [0 0]?
>
>
> Regards,
> David
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20170816/e36c42bb/attachment.html>


More information about the Matplotlib-users mailing list