Thanks everyone,
I finally got back to this, your suggestions worked like a charme,
example outputs can be seen here:

https://github.com/mne-tools/mne-python/pull/1972

Best,
Denis

2014-12-23 12:27 GMT+01:00 Phil Elson <pelson....@gmail.com>:

> If I understand your question fully, then yes it does.
> Have a play, and let us know how you get on.
>
> Best,
>
> Phil
>
> On 22 December 2014 at 11:15, Denis-Alexander Engemann <
> denis.engem...@gmail.com> wrote:
>
>> Thanks Phil,
>>
>> just to make sure I inderstand the logic of PathPatch. Does it cut out
>> vertices / paths that are detected to be inside an outline as the star in
>> this example?
>>
>> -Denis
>>
>>
>> 2014-12-22 12:09 GMT+01:00 Phil Elson <pelson....@gmail.com>:
>>
>>> Sorry its taken so long to get an answer, but essentially you want to
>>> concatenate the outer coordinates with the inner ones (reversed) to
>>> indicate that it is a hole. There is a pretty (simple) useful example that
>>> I added a few years ago for demonstrating the use of paths for markers:
>>> http://matplotlib.org/examples/pylab_examples/marker_path.html
>>>
>>> Constructing a patch from a path is as simple as (untested):
>>>
>>> import matplotlib.patches as mpatches
>>> patch = mpatches.PathPatch(my_path, facecolor='red', edgecolor='yellow')
>>> axes.add_patch(patch)
>>>
>>>
>>> HTH,
>>>
>>> Phil
>>>
>>>
>>> On 19 December 2014 at 23:01, Denis-Alexander Engemann <
>>> denis.engem...@gmail.com> wrote:
>>>
>>>> Dear list,
>>>>
>>>> I would like to create a custom image clipping mask using patches. My
>>>> constraint is that my patch is required to have an outer and multiple inner
>>>> outlines.
>>>> To provide an analogy, think of a mask used for disguise where you
>>>> leave three holes, two for the eyes, one for the mouth.
>>>> I have the xy coordinates for the 'head', and the xy coordinates for
>>>> each of the holes that I don't want to be hidden by the ensuing clipping
>>>> mask.
>>>>
>>>> What's the matplotlib way to construct my desired path + patch from
>>>> that?
>>>> Note, it's important in my case to use a patch object. What I need to
>>>> do would not work by simply masking my image using a masked array.
>>>>
>>>> Any pointer would be highly appreciated --
>>>> Denis
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>>>> with Interactivity, Sharing, Native Excel Exports, App Integration &
>>>> more
>>>> Get technology previously reserved for billion-dollar corporations, FREE
>>>>
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Matplotlib-users mailing list
>>>> Matplotlib-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>>
>>>>
>>>
>>
>
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to