On 2013/07/17 11:25 PM, Gregorio Bastardo wrote:
> Thanks Mike, it's hard to spot, but still better than nothing. Anyway,
> could it be the default behaviour of plotting masked arrays (single
> pixel for an isolated element)?

Gregorio,

I don't think this would be a good idea.  It adds quite a bit of 
complexity for a special case--and inevitably, the next request from 
someone would be to have the option of using any marker for the isolated 
points.  The concept of "single pixel" gets slippery across backends and 
output devices.

A better solution would be a simple function to identify such isolated 
points, for use when needed, to plot such points however you choose, 
typically with a separate call to "plot" specifying a marker.  This way, 
the extra complexity is called explicitly when needed, not carried along 
by every call to "plot".

Eric

>
> 2013/7/17 Michael Droettboom <md...@stsci.edu>:
>> You could use a single pixel for a marker (','), I guess.  But as you
>> say, you need at least two points for a line segment.
>>
>> Mike
>>
>> On 07/17/2013 10:45 AM, Gregorio Bastardo wrote:
>>> Hi,
>>>
>>> The following example demonstrates the problem, value 5 could not be
>>> seen w/o marker:
>>>
>>> data = np.arange(10)
>>> mask = [0,0,0,1,1,0,1,0,0,0]
>>> x = np.ma.masked_array(data, mask)
>>> plot(x)
>>> plot(x, '+')
>>>
>>> In my datasets, isolated unmasked values are rare, but placing a
>>> marker to spot them makes the whole graph cluttered. I do realize that
>>> at least 2 valid points are needed for a line segment, but still, is
>>> there any way to visualize these isolated unmasked values w/o a
>>> marker?
>>>
>>> Thanks,
>>> Gregorio


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to