Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
613 views
in Technique[技术] by (71.8m points)

What is the interpolation method of python matplotlib contourf

Maybe it's right before my eyes, but I fail to see it...

Does anyone know what is the default interpolation method of python matplotlib contourf? Where can I find relative documentation?

A secondary question is "can I change that method, and how?".

Thank you in advance.

Sakis

question from:https://stackoverflow.com/questions/65842764/what-is-the-interpolation-method-of-python-matplotlib-contourf

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I think they use something like a "marching squares" algorithm, similar to this implementation here in scikit-image:

To change the method you could simply evaluate the contour-arrays and then plot them as lines or filled polygons... for example:

https://scikit-image.org/docs/dev/auto_examples/edges/plot_contours.html


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...