0

I have cells in a model that have 3, 4, 5 or more edges (although usually 3 or 4). I would like to plot the edges and surface of these cells (I have all of the corners of all of the cells and a value that should correspond to a color). How would I do such a thing in python?

An example of the type of cells (in this case plotted on google earth, but that I do not need): Cell example

Yorian
  • 2,002
  • 5
  • 34
  • 60
  • Matplotlib has functions to [draw polygons](http://stackoverflow.com/questions/26935701/ploting-filled-polygons-in-python). In principle that's all you need; where is the specific problem? – MB-F Mar 23 '17 at 14:15
  • @Yorian You should specify the exact data format. Do you have the points sorted by cell? – ImportanceOfBeingErnest Mar 23 '17 at 14:47
  • @ImportanceOfBeingErnest Polygons are a generalization of triangles to an arbitrary number of points, so apart from performance I don't see a show-stopper (the OP never mentioned a point cloud but well defined cells with edges - i.e. polygons). Apart from that, I am not going to make assumptions about the OP's data structure - the question is simply too broad to answer as it stands now. – MB-F Mar 23 '17 at 15:26
  • 1
    @kazemakase Yep I see the point. One should simply ignore questions which are not specific enough instead of trying to interprete them, especially if people already have enough experience such that they should know [ask]. – ImportanceOfBeingErnest Mar 23 '17 at 15:38
  • My apologies for not being specific enough. Kazemakase answer helped me out. I have the data in a list of "polygons": [[(x1,y1), (x2,y2), (x3,y3)], etc.] – Yorian Mar 23 '17 at 16:00

0 Answers0