[Matplotlib-users] getting extra colors in figure

Smit, Christine E. (GSFC-610.2)[TELOPHASE CORP] christine.e.smit at nasa.gov
Tue Jul 26 09:53:45 EDT 2016


Thanks Nick and Eric! At least I now know why this happening.

On 7/26/16, 3:30 AM, "Matplotlib-users on behalf of Nicolas P. Rougier"
<matplotlib-users-bounces+christine.e.smit=nasa.gov at python.org on behalf
of Nicolas.Rougier at inria.fr> wrote:

>
>I think Michael explained this bug during his lighting talk at Scipy 2016:
>
>https://www.youtube.com/watch?v=0FVK-X_4wHs (time 56:00)
>
>The problem is that interpolation is made on colorspace and not dataspace.
>
>
>Nicolas
>
>
>
>
>> On 26 Jul 2016, at 09:11, Eric Firing <efiring at hawaii.edu> wrote:
>> 
>> On 2016/07/22 8:24 AM, Smit, Christine E. (GSFC-610.2)[TELOPHASE CORP]
>>wrote:
>>> Hi! I’m trying to plot data using imshow and ending up with more colors
>>> than I specify in the colormap. This is causing problems with a
>>>downstream
>>> user who is machine reading images to determine approximate data values
>>> based on colors. I think the issue has something to do with rounding
>>> because many colors in the image are only slightly off from the colors
>>>I
>>> specified. My plots have exactly one pixel per data value, so each
>>>pixel¹s
>>> color should be exactly a color in the colormap.
>>> 
>> 
>> Christine,
>> 
>> I can reproduce this on 1.5.1, and on what will become 1.5.3 (the last
>>of the 1.5 series) but not on the github branch for the upcoming 2.0
>>release.  Presumably the major image overhaul for 2.0 has fixed the
>>problem--even though it was most likely a problem no one knew we had.
>> 
>> Eric
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users at python.org
>> https://mail.python.org/mailman/listinfo/matplotlib-users
>
>_______________________________________________
>Matplotlib-users mailing list
>Matplotlib-users at python.org
>https://mail.python.org/mailman/listinfo/matplotlib-users



More information about the Matplotlib-users mailing list