[Matplotlib-users] paths optimizer
Al Niessner
Al.Niessner at gmx.net
Wed Nov 11 22:47:31 EST 2015
I have three paths that each define a bounding box. Lets just say I have
these three in (x,y) coordinates and all are moveto, lineto, lineto,
lineto, and closepoly:
1: (0, 0), (1.1, 0), (1.1, 1.1), (0, 1.1), (0, 0)
2: (.9, 0), (2, 0), (2, 1.1), (.9, 1.1), (.9, 0)
3: (.9, .9), (2, .9), (2, 2), (.9, 2) (.9, .9)
While my paths have more nodes and are not as cleanly vertical and
horizontal, it does cover the nature of what I am experiencing.
The first thing to note is that each box has overlap at x = 1 and y = 1
and all three boxes overlap at (1,1).
What I am looking for is an optimizer that would be smart enough to say
hey, because of the overlap, we can trim the boxes to:
1: (0,0) (1,0) (1,1) (0,1) (0,0)
2: (1,0) (2,0) (2,1), (1,1), (1,0)
3: (1,1) (2,1) (2,2), (1,2), (1,1)
I am not sure that optimizer is the right word to use either. I have
poked around matplotlib a bit (over many years) and tried searching but
guessing the search terms is not simple either. Hence, I am asking if
anyone is aware of matplotlib functionality that will help me do this
task. Any other tool outside of matplotlib would be just as nice of a
suggestion. One last bit, it has to work for N paths.
As always, thanks in advance.
--
Al Niessner
I have never found the companion that was so companionable as solitude.
- From Walden by Henry David Thoreau
The universe is indifferent, and life is brutal; however, it is man's
choice of behavior that makes them malevolent rather than benevolent.
Some will fall in love with life and drink it from a fountain
That is pouring like an avalanche coming down the mountain.
- From the song Pepper by the Butthole Surfers
More information about the Matplotlib-users
mailing list