SourceForge logo
SourceForge logo
Menu

[Matplotlib-users] Inner boundaries in tricontourf

From: Tijs de K. <tij...@sa...> - 2011年08月30日 17:23:41
Attachments: debug.py
Hey Matplotlib users,
Im trying to use the tricontourf function in matplotlib to reduce the complexity of an unstructured dataset into contours.
The resulting contours are retrieved from the path by the to_polygon() function, but i have some trouble distinguishing inner boundaries on the 
polygons, while plot.show() clearly doesn't
Using Matplotlib 1.01, and the attached code, I get one level, consisting of 2 polygons, where the first is the outer boundary, and the second should 
be the inner boundary.
The figure shown by show() correctly displays a square with a inner square cut-out. However i cannot distinguish between inner and outer boundaries in 
the list of polygons that to_polygon() returns.
Is there a trick how the plot functions distinguish inner boundaries? Calculating for each polygon if it is contained in other polygons will become 
complicated with a large number of polygons: As far as i can tell this would be checking if the starting point of each polygon is contained in any of 
the other polygons. Is there a simpler method i missed?
Thanks in advance,
Tijs de Kler

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /