Information request

Jeff,

No the example doesn't show that line

If I reduce the amount of data, the border will be on every side of the plot

I'll show you an orthographic plot with no maskinf tomorrow and you will see the problem easily, it wraps in a white line along the 0° meridian and a white circle in the pole

I think it's the imshow layer that is not totally transparent on the map background.. I tried every trick I could for example to put some zero-valued points on each corner to make imshow interpolate correctly the sides, but that doesn't make any difference

···

De Pauw Antoine wrote:

Jeff,

Yes they disappear, and they fluctuate with the interpolation method used

For example, nearest interpolation don't show the line

Also, if I reduce the grid resolution, the line is thicker, and if I use a
masked array to get rid of undesired values, the border shows really
strongly

Here's an example everyone will see:

http://img225.imageshack.us/img225/2671/testfigep2.png

(everything except the clouds is noise)

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  
Antoine: Sorry to seem dense, but I don't see anything wrong with that
plot. I see a white border along the north and south pole, but I
intrepret that to be missing values. However, my eyes are notoriously
bad. I'd like to be to run a script that generates the artifacts
myself, so I can zoom in and see the problem myself. Does the
griddata_demo.py script show the same problem for you?

-Jeff

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: mercredi 17 septembre 2008 19:05
To: John Hunter
Cc: De Pauw Antoine; Matplotlib Users
Subject: Re: [Matplotlib-users] Information request

John Hunter wrote:
  

On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jdh2358@...287...> wrote:

Attached is a screenshot (zoom.png) from the gimp, zoomed in near the
axes border. The black horizontal line is the top axes border, the
horizontal grey line is the artifact, the vertical dashed line is a
grid line. I don't know if this offers a clue, but if you look at a
zoom in the upper right corner, the grey line seems to break up and
curve down and to the right (corner.png)
    

Sorry, screwed up corner.png (I attached the original and not the
screenshot). The correct screenshot is attached
  
John: OK, now I finally see it. Antoine: Do these artifacts
disappear if you comment out the imshow call?

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

Jeff,

I included here a figure where you'll see the border problem for imshow in
my case

http://img217.imageshack.us/img217/5240/testfigzp3.png

The border wraps at -180 and 180 to form the white line

PS: it is atmospheric ice and not SO2, I just omitted to change the title ^^

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB

···

-----Original Message-----
From: Antoine De Pauw [mailto:andepauw@…2144…]
Sent: jeudi 18 septembre 2008 17:23
To: Jeff Whitaker; andepauw@...2144...
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: re:Re: [Matplotlib-users] Information request

Jeff,

No the example doesn't show that line

If I reduce the amount of data, the border will be on every side of the plot

I'll show you an orthographic plot with no maskinf tomorrow and you will see
the problem easily, it wraps in a white line along the 0° meridian and a
white circle in the pole

I think it's the imshow layer that is not totally transparent on the map
background.. I tried every trick I could for example to put some zero-valued
points on each corner to make imshow interpolate correctly the sides, but
that doesn't make any difference

De Pauw Antoine wrote:

Jeff,

Yes they disappear, and they fluctuate with the interpolation method used

For example, nearest interpolation don't show the line

Also, if I reduce the grid resolution, the line is thicker, and if I use

a

masked array to get rid of undesired values, the border shows really
strongly

Here's an example everyone will see:

http://img225.imageshack.us/img225/2671/testfigep2.png

(everything except the clouds is noise)

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  
Antoine: Sorry to seem dense, but I don't see anything wrong with that
plot. I see a white border along the north and south pole, but I
intrepret that to be missing values. However, my eyes are notoriously
bad. I'd like to be to run a script that generates the artifacts
myself, so I can zoom in and see the problem myself. Does the
griddata_demo.py script show the same problem for you?

-Jeff

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: mercredi 17 septembre 2008 19:05
To: John Hunter
Cc: De Pauw Antoine; Matplotlib Users
Subject: Re: [Matplotlib-users] Information request

John Hunter wrote:
  

On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jdh2358@...287...> wrote:

Attached is a screenshot (zoom.png) from the gimp, zoomed in near the
axes border. The black horizontal line is the top axes border, the
horizontal grey line is the artifact, the vertical dashed line is a
grid line. I don't know if this offers a clue, but if you look at a
zoom in the upper right corner, the grey line seems to break up and
curve down and to the right (corner.png)
    

Sorry, screwed up corner.png (I attached the original and not the
screenshot). The correct screenshot is attached
  
John: OK, now I finally see it. Antoine: Do these artifacts
disappear if you comment out the imshow call?

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

De Pauw Antoine wrote:

Jeff,

I included here a figure where you'll see the border problem for imshow in
my case

http://img217.imageshack.us/img217/5240/testfigzp3.png

The border wraps at -180 and 180 to form the white line

PS: it is atmospheric ice and not SO2, I just omitted to change the title ^^

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Universit� Libre de Bruxelles - ULB
  
Antoine: I hate to keep repeating myself - but we can't do much if you don't provide a self-contained script, that I can run, which reproduces the problem. My guess is that the line along the dateline, and the point at the South Pole are missing values (which griddata set to missing because they are outside the extent of the data) - but that's just a guess until I can reproduce it.

-Jeff

···

-----Original Message-----
From: Antoine De Pauw [mailto:andepauw@…2144…] Sent: jeudi 18 septembre 2008 17:23
To: Jeff Whitaker; andepauw@...2144...
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: re:Re: [Matplotlib-users] Information request

Jeff,

No the example doesn't show that line

If I reduce the amount of data, the border will be on every side of the plot

I'll show you an orthographic plot with no maskinf tomorrow and you will see
the problem easily, it wraps in a white line along the 0� meridian and a
white circle in the pole

I think it's the imshow layer that is not totally transparent on the map
background.. I tried every trick I could for example to put some zero-valued
points on each corner to make imshow interpolate correctly the sides, but
that doesn't make any difference

De Pauw Antoine wrote:
    

Jeff,

Yes they disappear, and they fluctuate with the interpolation method used

For example, nearest interpolation don't show the line

Also, if I reduce the grid resolution, the line is thicker, and if I use
      

a
  

masked array to get rid of undesired values, the border shows really
strongly

Here's an example everyone will see:

http://img225.imageshack.us/img225/2671/testfigep2.png

(everything except the clouds is noise)

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Universit� Libre de Bruxelles - ULB
  

Antoine: Sorry to seem dense, but I don't see anything wrong with that plot. I see a white border along the north and south pole, but I intrepret that to be missing values. However, my eyes are notoriously bad. I'd like to be to run a script that generates the artifacts myself, so I can zoom in and see the problem myself. Does the griddata_demo.py script show the same problem for you?

-Jeff
    

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: mercredi 17 septembre 2008 19:05
To: John Hunter
Cc: De Pauw Antoine; Matplotlib Users
Subject: Re: [Matplotlib-users] Information request

John Hunter wrote:
  

On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jdh2358@...287...> wrote:

Attached is a screenshot (zoom.png) from the gimp, zoomed in near the
axes border. The black horizontal line is the top axes border, the
horizontal grey line is the artifact, the vertical dashed line is a
grid line. I don't know if this offers a clue, but if you look at a
zoom in the upper right corner, the grey line seems to break up and
curve down and to the right (corner.png)
    

Sorry, screwed up corner.png (I attached the original and not the
screenshot). The correct screenshot is attached
  

John: OK, now I finally see it. Antoine: Do these artifacts disappear if you comment out the imshow call?

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328

Jeff,

The code snippet has been provided, if you run it with the csv reading code
instead of my binary file reading code you'll see it works

I have added some points at each corner of the map (-180:90 180:90 -180:-90
180:-90) with zero values and the white gap persists

If you cannot help me, that's not a problem, I just cannot give you a better
explanation...

Empty data is something normal in my files, sometimes the satellite has gaps
on its measurements and empty zones on the map are normal

The only problem is that it surrounds all the plot with a grayish border or
shadow when I plot it (a mickey-shaped data plot with white zeroed values
would give a mickey-shaped grey border), and all I want to know is if it is
normal that imshow has such a border, and if it is possible that it comes
from the library

I'll keep searching till I have a solution

Is there another plotting method than imshow which also has interpolation?

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB

···

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: lundi 22 septembre 2008 13:59
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:

Jeff,

I included here a figure where you'll see the border problem for imshow in
my case

http://img217.imageshack.us/img217/5240/testfigzp3.png

The border wraps at -180 and 180 to form the white line

PS: it is atmospheric ice and not SO2, I just omitted to change the title

^^

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  
Antoine: I hate to keep repeating myself - but we can't do much if you
don't provide a self-contained script, that I can run, which reproduces
the problem. My guess is that the line along the dateline, and the
point at the South Pole are missing values (which griddata set to
missing because they are outside the extent of the data) - but that's
just a guess until I can reproduce it.

-Jeff

-----Original Message-----
From: Antoine De Pauw [mailto:andepauw@…2144…]
Sent: jeudi 18 septembre 2008 17:23
To: Jeff Whitaker; andepauw@...2144...
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: re:Re: [Matplotlib-users] Information request

Jeff,

No the example doesn't show that line

If I reduce the amount of data, the border will be on every side of the

plot

I'll show you an orthographic plot with no maskinf tomorrow and you will

see

the problem easily, it wraps in a white line along the 0° meridian and a
white circle in the pole

I think it's the imshow layer that is not totally transparent on the map
background.. I tried every trick I could for example to put some

zero-valued

points on each corner to make imshow interpolate correctly the sides, but
that doesn't make any difference

De Pauw Antoine wrote:
    

Jeff,

Yes they disappear, and they fluctuate with the interpolation method

used

For example, nearest interpolation don't show the line

Also, if I reduce the grid resolution, the line is thicker, and if I use
      

a
  

masked array to get rid of undesired values, the border shows really
strongly

Here's an example everyone will see:

http://img225.imageshack.us/img225/2671/testfigep2.png

(everything except the clouds is noise)

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  

Antoine: Sorry to seem dense, but I don't see anything wrong with that
plot. I see a white border along the north and south pole, but I
intrepret that to be missing values. However, my eyes are notoriously
bad. I'd like to be to run a script that generates the artifacts
myself, so I can zoom in and see the problem myself. Does the
griddata_demo.py script show the same problem for you?

-Jeff
    

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: mercredi 17 septembre 2008 19:05
To: John Hunter
Cc: De Pauw Antoine; Matplotlib Users
Subject: Re: [Matplotlib-users] Information request

John Hunter wrote:
  

On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jdh2358@...287...> wrote:

Attached is a screenshot (zoom.png) from the gimp, zoomed in near the
axes border. The black horizontal line is the top axes border, the
horizontal grey line is the artifact, the vertical dashed line is a
grid line. I don't know if this offers a clue, but if you look at a
zoom in the upper right corner, the grey line seems to break up and
curve down and to the right (corner.png)
    

Sorry, screwed up corner.png (I attached the original and not the
screenshot). The correct screenshot is attached
  

John: OK, now I finally see it. Antoine: Do these artifacts
disappear if you comment out the imshow call?

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328

Jeff,

I still don't know how to either remove this artifact or fill my arrays with
values to remove empty regions, and I'll make a last attempt to resolve it

I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56

The actual code snippet is here:
http://snipplr.com/view/8307/map-plotting-python-code-temporary/

I hope you'll be able to reproduce it, I set the cmap to winter for you to
see the gap... setting it to hot will make the grayish border visible in
high resolution by zooming it... I think the border (not the empty zone)
could be an artifact with the hot colormap

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB

···

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: lundi 22 septembre 2008 13:59
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:

Jeff,

I included here a figure where you'll see the border problem for imshow in
my case

http://img217.imageshack.us/img217/5240/testfigzp3.png

The border wraps at -180 and 180 to form the white line

PS: it is atmospheric ice and not SO2, I just omitted to change the title

^^

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  
Antoine: I hate to keep repeating myself - but we can't do much if you
don't provide a self-contained script, that I can run, which reproduces
the problem. My guess is that the line along the dateline, and the
point at the South Pole are missing values (which griddata set to
missing because they are outside the extent of the data) - but that's
just a guess until I can reproduce it.

-Jeff

-----Original Message-----
From: Antoine De Pauw [mailto:andepauw@…2144…]
Sent: jeudi 18 septembre 2008 17:23
To: Jeff Whitaker; andepauw@...2144...
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: re:Re: [Matplotlib-users] Information request

Jeff,

No the example doesn't show that line

If I reduce the amount of data, the border will be on every side of the

plot

I'll show you an orthographic plot with no maskinf tomorrow and you will

see

the problem easily, it wraps in a white line along the 0° meridian and a
white circle in the pole

I think it's the imshow layer that is not totally transparent on the map
background.. I tried every trick I could for example to put some

zero-valued

points on each corner to make imshow interpolate correctly the sides, but
that doesn't make any difference

De Pauw Antoine wrote:
    

Jeff,

Yes they disappear, and they fluctuate with the interpolation method

used

For example, nearest interpolation don't show the line

Also, if I reduce the grid resolution, the line is thicker, and if I use
      

a
  

masked array to get rid of undesired values, the border shows really
strongly

Here's an example everyone will see:

http://img225.imageshack.us/img225/2671/testfigep2.png

(everything except the clouds is noise)

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  

Antoine: Sorry to seem dense, but I don't see anything wrong with that
plot. I see a white border along the north and south pole, but I
intrepret that to be missing values. However, my eyes are notoriously
bad. I'd like to be to run a script that generates the artifacts
myself, so I can zoom in and see the problem myself. Does the
griddata_demo.py script show the same problem for you?

-Jeff
    

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: mercredi 17 septembre 2008 19:05
To: John Hunter
Cc: De Pauw Antoine; Matplotlib Users
Subject: Re: [Matplotlib-users] Information request

John Hunter wrote:
  

On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jdh2358@...287...> wrote:

Attached is a screenshot (zoom.png) from the gimp, zoomed in near the
axes border. The black horizontal line is the top axes border, the
horizontal grey line is the artifact, the vertical dashed line is a
grid line. I don't know if this offers a clue, but if you look at a
zoom in the upper right corner, the grey line seems to break up and
curve down and to the right (corner.png)
    

Sorry, screwed up corner.png (I attached the original and not the
screenshot). The correct screenshot is attached
  

John: OK, now I finally see it. Antoine: Do these artifacts
disappear if you comment out the imshow call?

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328

De Pauw Antoine wrote:

Jeff,

I still don't know how to either remove this artifact or fill my arrays with
values to remove empty regions, and I'll make a last attempt to resolve it

I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56

The actual code snippet is here:
map plotting python code (temporary) - Python Snipplr Social Repository

I hope you'll be able to reproduce it, I set the cmap to winter for you to
see the gap... setting it to hot will make the grayish border visible in
high resolution by zooming it... I think the border (not the empty zone)
could be an artifact with the hot colormap

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB

Antoine: As I suspected, that gap around the edges of the plot is a consequence of the gridding procedure. griddata doesn't do extrapolation, so there are missing values on the grid outside the convex hull of the input observations. You can either just live with it, or set the plotting region so that it fits entirely within the convex hull of the data. This is what I've done in the modified version of your script below. I've also eliminated the transform_scalar call by gridding directly on the projection grid (instead of gridding to a lat/lon grid, then interpolating to the projection grid). Hope this helps.

-Jeff

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
import os
fileName = '20080821.b56'
nx = 360; ny = 180
titre='SO2'
legende='Delta Brightness Temperature (K)'
nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:]))
rawfile=np.fromfile(open(fileName,'rb'),'<d',-1)
Lat=rawfile[0:nbreligne]
Lon=rawfile[nbreligne:nbreligne*2]
Val=rawfile[nbreligne*21:nbreligne*22]
map=Basemap(projection='mill',llcrnrlat=-89,urcrnrlat=89,\
            urcrnrlon=179,llcrnrlon=-179,resolution='l')
xi=np.linspace(map.xmin,map.xmax,nx)
yi=np.linspace(map.ymin,map.ymax,ny)
x, y = map(Lon, Lat)
zi=mlab.griddata(x,y,Val,xi,yi)
map.imshow(zi,plt.cm.winter,vmin=-5,vmax=-1.2)
cb=plt.colorbar(shrink=0.6)
cb.ax.set_ylabel(legende,fontsize=11)
for t in cb.ax.get_yticklabels():
    t.set_fontsize(7)
meridians = np.arange(-180,180,60)
parallels = np.arange(-90,90,30)
map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25)
map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25)
map.drawcoastlines(0.25,antialiased=1)
plt.title(titre)
plt.show()

···

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: lundi 22 septembre 2008 13:59
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

I included here a figure where you'll see the border problem for imshow in
my case

http://img217.imageshack.us/img217/5240/testfigzp3.png

The border wraps at -180 and 180 to form the white line

PS: it is atmospheric ice and not SO2, I just omitted to change the title
    

^^
  

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  
Antoine: I hate to keep repeating myself - but we can't do much if you don't provide a self-contained script, that I can run, which reproduces the problem. My guess is that the line along the dateline, and the point at the South Pole are missing values (which griddata set to missing because they are outside the extent of the data) - but that's just a guess until I can reproduce it.

-Jeff
  

-----Original Message-----
From: Antoine De Pauw [mailto:andepauw@…2144…] Sent: jeudi 18 septembre 2008 17:23
To: Jeff Whitaker; andepauw@...2144...
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: re:Re: [Matplotlib-users] Information request

Jeff,

No the example doesn't show that line

If I reduce the amount of data, the border will be on every side of the
    

plot
  

I'll show you an orthographic plot with no maskinf tomorrow and you will
    

see
  

the problem easily, it wraps in a white line along the 0° meridian and a
white circle in the pole

I think it's the imshow layer that is not totally transparent on the map
background.. I tried every trick I could for example to put some
    

zero-valued
  

points on each corner to make imshow interpolate correctly the sides, but
that doesn't make any difference

De Pauw Antoine wrote:
    

Jeff,

Yes they disappear, and they fluctuate with the interpolation method
        

used
  

For example, nearest interpolation don't show the line

Also, if I reduce the grid resolution, the line is thicker, and if I use
      

a
  

masked array to get rid of undesired values, the border shows really
strongly

Here's an example everyone will see:

http://img225.imageshack.us/img225/2671/testfigep2.png

(everything except the clouds is noise)

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  

Antoine: Sorry to seem dense, but I don't see anything wrong with that plot. I see a white border along the north and south pole, but I intrepret that to be missing values. However, my eyes are notoriously bad. I'd like to be to run a script that generates the artifacts myself, so I can zoom in and see the problem myself. Does the griddata_demo.py script show the same problem for you?

-Jeff
    

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: mercredi 17 septembre 2008 19:05
To: John Hunter
Cc: De Pauw Antoine; Matplotlib Users
Subject: Re: [Matplotlib-users] Information request

John Hunter wrote:
  

On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jdh2358@...287...> >>>>> > wrote:
  

Attached is a screenshot (zoom.png) from the gimp, zoomed in near the
axes border. The black horizontal line is the top axes border, the
horizontal grey line is the artifact, the vertical dashed line is a
grid line. I don't know if this offers a clue, but if you look at a
zoom in the upper right corner, the grey line seems to break up and
curve down and to the right (corner.png)
    

Sorry, screwed up corner.png (I attached the original and not the
screenshot). The correct screenshot is attached
  

John: OK, now I finally see it. Antoine: Do these artifacts disappear if you comment out the imshow call?

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

De Pauw Antoine wrote:

Jeff,

I still don't know how to either remove this artifact or fill my arrays with
values to remove empty regions, and I'll make a last attempt to resolve it

I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56

The actual code snippet is here:
map plotting python code (temporary) - Python Snipplr Social Repository

I hope you'll be able to reproduce it, I set the cmap to winter for you to
see the gap... setting it to hot will make the grayish border visible in
high resolution by zooming it... I think the border (not the empty zone)
could be an artifact with the hot colormap

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB

Antoine: Here is a version that just plots the pixels directly, without interpolating to a grid. I personally like this better, since you can easily see where you actually have data.

HTH,

-Jeff

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
import os
fileName = '20080821.b56'
titre='SO2'
legende='Delta Brightness Temperature (K)'
nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:]))
rawfile=np.fromfile(open(fileName,'rb'),'<d',-1)
Lat=rawfile[0:nbreligne]
Lon=rawfile[nbreligne:nbreligne*2]
Val=rawfile[nbreligne*21:nbreligne*22]
map=Basemap(projection='mill',llcrnrlat=-90,urcrnrlat=90,\
            urcrnrlon=180,llcrnrlon=-180,resolution='l')
x, y = map(Lon, Lat)
plt.scatter(x,y,s=25,c=Val,marker='s',edgecolor="None",cmap=plt.cm.winter,vmin=-5,vmax=-1.2, alpha=0.5)
cb=plt.colorbar(shrink=0.6)
cb.ax.set_ylabel(legende,fontsize=11)
for t in cb.ax.get_yticklabels():
    t.set_fontsize(7)
meridians = np.arange(-180,180,60)
parallels = np.arange(-90,90,30)
map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25)
map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25)
map.drawcoastlines(0.25,antialiased=1)
plt.title(titre)
plt.show()

···

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: lundi 22 septembre 2008 13:59
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

I included here a figure where you'll see the border problem for imshow in
my case

http://img217.imageshack.us/img217/5240/testfigzp3.png

The border wraps at -180 and 180 to form the white line

PS: it is atmospheric ice and not SO2, I just omitted to change the title
    

^^
  

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  
Antoine: I hate to keep repeating myself - but we can't do much if you don't provide a self-contained script, that I can run, which reproduces the problem. My guess is that the line along the dateline, and the point at the South Pole are missing values (which griddata set to missing because they are outside the extent of the data) - but that's just a guess until I can reproduce it.

-Jeff
  

-----Original Message-----
From: Antoine De Pauw [mailto:andepauw@…2144…] Sent: jeudi 18 septembre 2008 17:23
To: Jeff Whitaker; andepauw@...2144...
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: re:Re: [Matplotlib-users] Information request

Jeff,

No the example doesn't show that line

If I reduce the amount of data, the border will be on every side of the
    

plot
  

I'll show you an orthographic plot with no maskinf tomorrow and you will
    

see
  

the problem easily, it wraps in a white line along the 0° meridian and a
white circle in the pole

I think it's the imshow layer that is not totally transparent on the map
background.. I tried every trick I could for example to put some
    

zero-valued
  

points on each corner to make imshow interpolate correctly the sides, but
that doesn't make any difference

De Pauw Antoine wrote:
    

Jeff,

Yes they disappear, and they fluctuate with the interpolation method
        

used
  

For example, nearest interpolation don't show the line

Also, if I reduce the grid resolution, the line is thicker, and if I use
      

a
  

masked array to get rid of undesired values, the border shows really
strongly

Here's an example everyone will see:

http://img225.imageshack.us/img225/2671/testfigep2.png

(everything except the clouds is noise)

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  

Antoine: Sorry to seem dense, but I don't see anything wrong with that plot. I see a white border along the north and south pole, but I intrepret that to be missing values. However, my eyes are notoriously bad. I'd like to be to run a script that generates the artifacts myself, so I can zoom in and see the problem myself. Does the griddata_demo.py script show the same problem for you?

-Jeff
    

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: mercredi 17 septembre 2008 19:05
To: John Hunter
Cc: De Pauw Antoine; Matplotlib Users
Subject: Re: [Matplotlib-users] Information request

John Hunter wrote:
  

On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jdh2358@...287...> >>>>> > wrote:
  

Attached is a screenshot (zoom.png) from the gimp, zoomed in near the
axes border. The black horizontal line is the top axes border, the
horizontal grey line is the artifact, the vertical dashed line is a
grid line. I don't know if this offers a clue, but if you look at a
zoom in the upper right corner, the grey line seems to break up and
curve down and to the right (corner.png)
    

Sorry, screwed up corner.png (I attached the original and not the
screenshot). The correct screenshot is attached
  

John: OK, now I finally see it. Antoine: Do these artifacts disappear if you comment out the imshow call?

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

Jeff,

Thanks for your help, I now know that it's a missing data problem

However, I need to make, for example, orthographic maps of ozone centered on
the polar region, and there is no possibility to cut the unaesthetic regions
of the plot in that case

I'll try to plot a data grid containing the weaker value for all points
before the actual data I'm plotting, to see if I can set the background
color and avoid these gaps

If you know of any method to do that instead of plotting a whole grid before
anything else, please tell

I have to thank you for your help and I wonder how you find the time
required to work on that mailing list

Have a nice day,

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB

···

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: mardi 23 septembre 2008 20:38
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:

Jeff,

I still don't know how to either remove this artifact or fill my arrays

with

values to remove empty regions, and I'll make a last attempt to resolve it

I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56

The actual code snippet is here:
map plotting python code (temporary) - Python Snipplr Social Repository

I hope you'll be able to reproduce it, I set the cmap to winter for you to
see the gap... setting it to hot will make the grayish border visible in
high resolution by zooming it... I think the border (not the empty zone)
could be an artifact with the hot colormap

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB

Antoine: Here is a version that just plots the pixels directly, without
interpolating to a grid. I personally like this better, since you can
easily see where you actually have data.

HTH,

-Jeff

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
import os
fileName = '20080821.b56'
titre='SO2'
legende='Delta Brightness Temperature (K)'
nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:]))
rawfile=np.fromfile(open(fileName,'rb'),'<d',-1)
Lat=rawfile[0:nbreligne]
Lon=rawfile[nbreligne:nbreligne*2]
Val=rawfile[nbreligne*21:nbreligne*22]
map=Basemap(projection='mill',llcrnrlat=-90,urcrnrlat=90,\
            urcrnrlon=180,llcrnrlon=-180,resolution='l')
x, y = map(Lon, Lat)
plt.scatter(x,y,s=25,c=Val,marker='s',edgecolor="None",cmap=plt.cm.winter,vm
in=-5,vmax=-1.2,
alpha=0.5)
cb=plt.colorbar(shrink=0.6)
cb.ax.set_ylabel(legende,fontsize=11)
for t in cb.ax.get_yticklabels():
    t.set_fontsize(7)
meridians = np.arange(-180,180,60)
parallels = np.arange(-90,90,30)
map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25)
map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25)
map.drawcoastlines(0.25,antialiased=1)
plt.title(titre)
plt.show()

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: lundi 22 septembre 2008 13:59
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

I included here a figure where you'll see the border problem for imshow

in

my case

http://img217.imageshack.us/img217/5240/testfigzp3.png

The border wraps at -180 and 180 to form the white line

PS: it is atmospheric ice and not SO2, I just omitted to change the title
    

^^
  

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  
Antoine: I hate to keep repeating myself - but we can't do much if you
don't provide a self-contained script, that I can run, which reproduces
the problem. My guess is that the line along the dateline, and the
point at the South Pole are missing values (which griddata set to
missing because they are outside the extent of the data) - but that's
just a guess until I can reproduce it.

-Jeff
  

-----Original Message-----
From: Antoine De Pauw [mailto:andepauw@…2144…]
Sent: jeudi 18 septembre 2008 17:23
To: Jeff Whitaker; andepauw@...2144...
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: re:Re: [Matplotlib-users] Information request

Jeff,

No the example doesn't show that line

If I reduce the amount of data, the border will be on every side of the
    

plot
  

I'll show you an orthographic plot with no maskinf tomorrow and you will
    

see
  

the problem easily, it wraps in a white line along the 0° meridian and a
white circle in the pole

I think it's the imshow layer that is not totally transparent on the map
background.. I tried every trick I could for example to put some
    

zero-valued
  

points on each corner to make imshow interpolate correctly the sides, but
that doesn't make any difference

De Pauw Antoine wrote:
    

Jeff,

Yes they disappear, and they fluctuate with the interpolation method
        

used
  

For example, nearest interpolation don't show the line

Also, if I reduce the grid resolution, the line is thicker, and if I

use

      

a
  

masked array to get rid of undesired values, the border shows really
strongly

Here's an example everyone will see:

http://img225.imageshack.us/img225/2671/testfigep2.png

(everything except the clouds is noise)

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry

and

photophysics laboratory
Université Libre de Bruxelles - ULB
  

Antoine: Sorry to seem dense, but I don't see anything wrong with that
plot. I see a white border along the north and south pole, but I
intrepret that to be missing values. However, my eyes are notoriously
bad. I'd like to be to run a script that generates the artifacts
myself, so I can zoom in and see the problem myself. Does the
griddata_demo.py script show the same problem for you?

-Jeff
    

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: mercredi 17 septembre 2008 19:05
To: John Hunter
Cc: De Pauw Antoine; Matplotlib Users
Subject: Re: [Matplotlib-users] Information request

John Hunter wrote:
  

On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jdh2358@...287...> >>>>> > wrote:
  

Attached is a screenshot (zoom.png) from the gimp, zoomed in near the
axes border. The black horizontal line is the top axes border, the
horizontal grey line is the artifact, the vertical dashed line is a
grid line. I don't know if this offers a clue, but if you look at a
zoom in the upper right corner, the grey line seems to break up and
curve down and to the right (corner.png)
    

Sorry, screwed up corner.png (I attached the original and not the
screenshot). The correct screenshot is attached
  

John: OK, now I finally see it. Antoine: Do these artifacts
disappear if you comment out the imshow call?

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

Hi Jeff,

I finally found out how to fill my figure with a background color using
axes.set_axis_bgcolor(color), but I'm facing the following problem now:

How could I get the lower color of a colormap? This is quite undocumented
and I don’t know the colormap properties I could use for that

I know there must be an accessible value somewhere, like for the
ax.get_yticklabels() you gave me

If someone had the clue, my problems would then be completely solved

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB

···

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: mardi 23 septembre 2008 20:38
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:

Jeff,

I still don't know how to either remove this artifact or fill my arrays

with

values to remove empty regions, and I'll make a last attempt to resolve it

I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56

The actual code snippet is here:
map plotting python code (temporary) - Python Snipplr Social Repository

I hope you'll be able to reproduce it, I set the cmap to winter for you to
see the gap... setting it to hot will make the grayish border visible in
high resolution by zooming it... I think the border (not the empty zone)
could be an artifact with the hot colormap

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB

Antoine: Here is a version that just plots the pixels directly, without
interpolating to a grid. I personally like this better, since you can
easily see where you actually have data.

HTH,

-Jeff

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
import os
fileName = '20080821.b56'
titre='SO2'
legende='Delta Brightness Temperature (K)'
nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:]))
rawfile=np.fromfile(open(fileName,'rb'),'<d',-1)
Lat=rawfile[0:nbreligne]
Lon=rawfile[nbreligne:nbreligne*2]
Val=rawfile[nbreligne*21:nbreligne*22]
map=Basemap(projection='mill',llcrnrlat=-90,urcrnrlat=90,\
            urcrnrlon=180,llcrnrlon=-180,resolution='l')
x, y = map(Lon, Lat)
plt.scatter(x,y,s=25,c=Val,marker='s',edgecolor="None",cmap=plt.cm.winter,vm
in=-5,vmax=-1.2,
alpha=0.5)
cb=plt.colorbar(shrink=0.6)
cb.ax.set_ylabel(legende,fontsize=11)
for t in cb.ax.get_yticklabels():
    t.set_fontsize(7)
meridians = np.arange(-180,180,60)
parallels = np.arange(-90,90,30)
map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25)
map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25)
map.drawcoastlines(0.25,antialiased=1)
plt.title(titre)
plt.show()

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: lundi 22 septembre 2008 13:59
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

I included here a figure where you'll see the border problem for imshow

in

my case

http://img217.imageshack.us/img217/5240/testfigzp3.png

The border wraps at -180 and 180 to form the white line

PS: it is atmospheric ice and not SO2, I just omitted to change the title
    

^^
  

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  
Antoine: I hate to keep repeating myself - but we can't do much if you
don't provide a self-contained script, that I can run, which reproduces
the problem. My guess is that the line along the dateline, and the
point at the South Pole are missing values (which griddata set to
missing because they are outside the extent of the data) - but that's
just a guess until I can reproduce it.

-Jeff
  

-----Original Message-----
From: Antoine De Pauw [mailto:andepauw@…2144…]
Sent: jeudi 18 septembre 2008 17:23
To: Jeff Whitaker; andepauw@...2144...
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: re:Re: [Matplotlib-users] Information request

Jeff,

No the example doesn't show that line

If I reduce the amount of data, the border will be on every side of the
    

plot
  

I'll show you an orthographic plot with no maskinf tomorrow and you will
    

see
  

the problem easily, it wraps in a white line along the 0° meridian and a
white circle in the pole

I think it's the imshow layer that is not totally transparent on the map
background.. I tried every trick I could for example to put some
    

zero-valued
  

points on each corner to make imshow interpolate correctly the sides, but
that doesn't make any difference

De Pauw Antoine wrote:
    

Jeff,

Yes they disappear, and they fluctuate with the interpolation method
        

used
  

For example, nearest interpolation don't show the line

Also, if I reduce the grid resolution, the line is thicker, and if I

use

      

a
  

masked array to get rid of undesired values, the border shows really
strongly

Here's an example everyone will see:

http://img225.imageshack.us/img225/2671/testfigep2.png

(everything except the clouds is noise)

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry

and

photophysics laboratory
Université Libre de Bruxelles - ULB
  

Antoine: Sorry to seem dense, but I don't see anything wrong with that
plot. I see a white border along the north and south pole, but I
intrepret that to be missing values. However, my eyes are notoriously
bad. I'd like to be to run a script that generates the artifacts
myself, so I can zoom in and see the problem myself. Does the
griddata_demo.py script show the same problem for you?

-Jeff
    

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: mercredi 17 septembre 2008 19:05
To: John Hunter
Cc: De Pauw Antoine; Matplotlib Users
Subject: Re: [Matplotlib-users] Information request

John Hunter wrote:
  

On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jdh2358@...287...> >>>>> > wrote:
  

Attached is a screenshot (zoom.png) from the gimp, zoomed in near the
axes border. The black horizontal line is the top axes border, the
horizontal grey line is the artifact, the vertical dashed line is a
grid line. I don't know if this offers a clue, but if you look at a
zoom in the upper right corner, the grey line seems to break up and
curve down and to the right (corner.png)
    

Sorry, screwed up corner.png (I attached the original and not the
screenshot). The correct screenshot is attached
  

John: OK, now I finally see it. Antoine: Do these artifacts
disappear if you comment out the imshow call?

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

De Pauw Antoine wrote:

Hi Jeff,

I finally found out how to fill my figure with a background color using
axes.set_axis_bgcolor(color), but I'm facing the following problem now:

How could I get the lower color of a colormap? This is quite undocumented
and I don�t know the colormap properties I could use for that

I know there must be an accessible value somewhere, like for the
ax.get_yticklabels() you gave me

If someone had the clue, my problems would then be completely solved

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Universit� Libre de Bruxelles - ULB
  
Antoine: To get the RGBA value associated with a particular data value, just call the colormap as a function as pass it that value. For example

>>> import matplotlib.pyplot as plt
>>> plt.cm.jet(1)
(0.0, 0.0, 0.517825311942959, 1.0)

BTW: the 'fill_color' kwarg of drawmapboundary basemap method allows you to set the background color of the map.

http://matplotlib.sourceforge.net/basemap/doc/html/api/basemap_api.html

It fills only the map region (which for some projections, like the orthographic, is not the same as the axes region).

-Jeff

···

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: mardi 23 septembre 2008 20:38
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

I still don't know how to either remove this artifact or fill my arrays
    

with
  

values to remove empty regions, and I'll make a last attempt to resolve it

I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56

The actual code snippet is here:
map plotting python code (temporary) - Python Snipplr Social Repository

I hope you'll be able to reproduce it, I set the cmap to winter for you to
see the gap... setting it to hot will make the grayish border visible in
high resolution by zooming it... I think the border (not the empty zone)
could be an artifact with the hot colormap

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Universit� Libre de Bruxelles - ULB

Antoine: Here is a version that just plots the pixels directly, without interpolating to a grid. I personally like this better, since you can easily see where you actually have data.

HTH,

-Jeff

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
import os
fileName = '20080821.b56'
titre='SO2'
legende='Delta Brightness Temperature (K)'
nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:]))
rawfile=np.fromfile(open(fileName,'rb'),'<d',-1)
Lat=rawfile[0:nbreligne]
Lon=rawfile[nbreligne:nbreligne*2]
Val=rawfile[nbreligne*21:nbreligne*22]
map=Basemap(projection='mill',llcrnrlat=-90,urcrnrlat=90,\
            urcrnrlon=180,llcrnrlon=-180,resolution='l')
x, y = map(Lon, Lat)
plt.scatter(x,y,s=25,c=Val,marker='s',edgecolor="None",cmap=plt.cm.winter,vm
in=-5,vmax=-1.2, alpha=0.5)
cb=plt.colorbar(shrink=0.6)
cb.ax.set_ylabel(legende,fontsize=11)
for t in cb.ax.get_yticklabels():
    t.set_fontsize(7)
meridians = np.arange(-180,180,60)
parallels = np.arange(-90,90,30)
map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25)
map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25)
map.drawcoastlines(0.25,antialiased=1)
plt.title(titre)
plt.show()
  

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: lundi 22 septembre 2008 13:59
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

I included here a figure where you'll see the border problem for imshow
      

in
  

my case

http://img217.imageshack.us/img217/5240/testfigzp3.png

The border wraps at -180 and 180 to form the white line

PS: it is atmospheric ice and not SO2, I just omitted to change the title
    

^^
  

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Universit� Libre de Bruxelles - ULB
  

Antoine: I hate to keep repeating myself - but we can't do much if you don't provide a self-contained script, that I can run, which reproduces the problem. My guess is that the line along the dateline, and the point at the South Pole are missing values (which griddata set to missing because they are outside the extent of the data) - but that's just a guess until I can reproduce it.

-Jeff
  

-----Original Message-----
From: Antoine De Pauw [mailto:andepauw@…2144…] Sent: jeudi 18 septembre 2008 17:23
To: Jeff Whitaker; andepauw@...2144...
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: re:Re: [Matplotlib-users] Information request

Jeff,

No the example doesn't show that line

If I reduce the amount of data, the border will be on every side of the
    

plot
  

I'll show you an orthographic plot with no maskinf tomorrow and you will
    

see
  

the problem easily, it wraps in a white line along the 0� meridian and a
white circle in the pole

I think it's the imshow layer that is not totally transparent on the map
background.. I tried every trick I could for example to put some
    

zero-valued
  

points on each corner to make imshow interpolate correctly the sides, but
that doesn't make any difference

De Pauw Antoine wrote:
    

Jeff,

Yes they disappear, and they fluctuate with the interpolation method
        

used
  

For example, nearest interpolation don't show the line

Also, if I reduce the grid resolution, the line is thicker, and if I
          

use
  

a
  

masked array to get rid of undesired values, the border shows really
strongly

Here's an example everyone will see:

http://img225.imageshack.us/img225/2671/testfigep2.png

(everything except the clouds is noise)

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry
          

and
  

photophysics laboratory
Universit� Libre de Bruxelles - ULB
  

Antoine: Sorry to seem dense, but I don't see anything wrong with that plot. I see a white border along the north and south pole, but I intrepret that to be missing values. However, my eyes are notoriously bad. I'd like to be to run a script that generates the artifacts myself, so I can zoom in and see the problem myself. Does the griddata_demo.py script show the same problem for you?

-Jeff
    

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: mercredi 17 septembre 2008 19:05
To: John Hunter
Cc: De Pauw Antoine; Matplotlib Users
Subject: Re: [Matplotlib-users] Information request

John Hunter wrote:
  

On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jdh2358@...287...> >>>>>> >>>>>> >> wrote:
  

Attached is a screenshot (zoom.png) from the gimp, zoomed in near the
axes border. The black horizontal line is the top axes border, the
horizontal grey line is the artifact, the vertical dashed line is a
grid line. I don't know if this offers a clue, but if you look at a
zoom in the upper right corner, the grey line seems to break up and
curve down and to the right (corner.png)
    

Sorry, screwed up corner.png (I attached the original and not the
screenshot). The correct screenshot is attached
  

John: OK, now I finally see it. Antoine: Do these artifacts disappear if you comment out the imshow call?

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328

You can get the lowest color of a colormap by evaluating it at zero, eg

In [1]: import matplotlib.cm as cm

In [2]: cm.jet(0)
Out[2]: (0.0, 0.0, 0.5, 1.0)

···

On Thu, Sep 25, 2008 at 7:15 AM, Jeff Whitaker <jswhit@...146...> wrote:

De Pauw Antoine wrote:

Hi Jeff,

I finally found out how to fill my figure with a background color using
axes.set_axis_bgcolor(color), but I'm facing the following problem now:

How could I get the lower color of a colormap? This is quite undocumented
and I don't know the colormap properties I could use for that

I know there must be an accessible value somewhere, like for the
ax.get_yticklabels() you gave me

If someone had the clue, my problems would then be completely solved

Jeff,

Thanks for the tip, it's now working perfectly

However, there's still that border with the imshow plot, and I think it
would be good to have it transparent

There's a zoomed picture I made:
http://img218.imageshack.us/img218/5833/imshowborderxz9.png

You see the shadow around the data...

It would be nice for next releases of Matplotlib to get rid of that, but I'm
not able to patch it myself or so... I know there's still a lot of work with
the lib but keep the good work, it is really fantastic

Thanks for your help!

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB

···

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: jeudi 25 septembre 2008 14:15
To: De Pauw Antoine
Cc: 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:

Hi Jeff,

I finally found out how to fill my figure with a background color using
axes.set_axis_bgcolor(color), but I'm facing the following problem now:

How could I get the lower color of a colormap? This is quite undocumented
and I don’t know the colormap properties I could use for that

I know there must be an accessible value somewhere, like for the
ax.get_yticklabels() you gave me

If someone had the clue, my problems would then be completely solved

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  
Antoine: To get the RGBA value associated with a particular data value,
just call the colormap as a function as pass it that value. For example

>>> import matplotlib.pyplot as plt
>>> plt.cm.jet(1)
(0.0, 0.0, 0.517825311942959, 1.0)

BTW: the 'fill_color' kwarg of drawmapboundary basemap method allows you
to set the background color of the map.

http://matplotlib.sourceforge.net/basemap/doc/html/api/basemap_api.html

It fills only the map region (which for some projections, like the
orthographic, is not the same as the axes region).

-Jeff

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: mardi 23 septembre 2008 20:38
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

I still don't know how to either remove this artifact or fill my arrays
    

with
  

values to remove empty regions, and I'll make a last attempt to resolve

it

I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56

The actual code snippet is here:
map plotting python code (temporary) - Python Snipplr Social Repository

I hope you'll be able to reproduce it, I set the cmap to winter for you

to

see the gap... setting it to hot will make the grayish border visible in
high resolution by zooming it... I think the border (not the empty zone)
could be an artifact with the hot colormap

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB

Antoine: Here is a version that just plots the pixels directly, without
interpolating to a grid. I personally like this better, since you can
easily see where you actually have data.

HTH,

-Jeff

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
import os
fileName = '20080821.b56'
titre='SO2'
legende='Delta Brightness Temperature (K)'
nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:]))
rawfile=np.fromfile(open(fileName,'rb'),'<d',-1)
Lat=rawfile[0:nbreligne]
Lon=rawfile[nbreligne:nbreligne*2]
Val=rawfile[nbreligne*21:nbreligne*22]
map=Basemap(projection='mill',llcrnrlat=-90,urcrnrlat=90,\
            urcrnrlon=180,llcrnrlon=-180,resolution='l')
x, y = map(Lon, Lat)

plt.scatter(x,y,s=25,c=Val,marker='s',edgecolor="None",cmap=plt.cm.winter,vm

in=-5,vmax=-1.2,
alpha=0.5)
cb=plt.colorbar(shrink=0.6)
cb.ax.set_ylabel(legende,fontsize=11)
for t in cb.ax.get_yticklabels():
    t.set_fontsize(7)
meridians = np.arange(-180,180,60)
parallels = np.arange(-90,90,30)
map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25)
map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25)
map.drawcoastlines(0.25,antialiased=1)
plt.title(titre)
plt.show()
  

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: lundi 22 septembre 2008 13:59
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

I included here a figure where you'll see the border problem for imshow
      

in
  

my case

http://img217.imageshack.us/img217/5240/testfigzp3.png

The border wraps at -180 and 180 to form the white line

PS: it is atmospheric ice and not SO2, I just omitted to change the

title

    

^^
  

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  

Antoine: I hate to keep repeating myself - but we can't do much if you
don't provide a self-contained script, that I can run, which reproduces
the problem. My guess is that the line along the dateline, and the
point at the South Pole are missing values (which griddata set to
missing because they are outside the extent of the data) - but that's
just a guess until I can reproduce it.

-Jeff
  

-----Original Message-----
From: Antoine De Pauw [mailto:andepauw@…2144…]
Sent: jeudi 18 septembre 2008 17:23
To: Jeff Whitaker; andepauw@...2144...
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: re:Re: [Matplotlib-users] Information request

Jeff,

No the example doesn't show that line

If I reduce the amount of data, the border will be on every side of the
    

plot
  

I'll show you an orthographic plot with no maskinf tomorrow and you will
    

see
  

the problem easily, it wraps in a white line along the 0° meridian and a
white circle in the pole

I think it's the imshow layer that is not totally transparent on the map
background.. I tried every trick I could for example to put some
    

zero-valued
  

points on each corner to make imshow interpolate correctly the sides,

but

that doesn't make any difference

De Pauw Antoine wrote:
    

Jeff,

Yes they disappear, and they fluctuate with the interpolation method
        

used
  

For example, nearest interpolation don't show the line

Also, if I reduce the grid resolution, the line is thicker, and if I
          

use
  

a
  

masked array to get rid of undesired values, the border shows really
strongly

Here's an example everyone will see:

http://img225.imageshack.us/img225/2671/testfigep2.png

(everything except the clouds is noise)

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry
          

and
  

photophysics laboratory
Université Libre de Bruxelles - ULB
  

Antoine: Sorry to seem dense, but I don't see anything wrong with that

plot. I see a white border along the north and south pole, but I
intrepret that to be missing values. However, my eyes are notoriously
bad. I'd like to be to run a script that generates the artifacts
myself, so I can zoom in and see the problem myself. Does the
griddata_demo.py script show the same problem for you?

-Jeff
    

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: mercredi 17 septembre 2008 19:05
To: John Hunter
Cc: De Pauw Antoine; Matplotlib Users
Subject: Re: [Matplotlib-users] Information request

John Hunter wrote:
  

On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jdh2358@...287...> >>>>>> >>>>>> >> wrote:
  

Attached is a screenshot (zoom.png) from the gimp, zoomed in near

the

axes border. The black horizontal line is the top axes border, the
horizontal grey line is the artifact, the vertical dashed line is a
grid line. I don't know if this offers a clue, but if you look at a
zoom in the upper right corner, the grey line seems to break up and
curve down and to the right (corner.png)
    

Sorry, screwed up corner.png (I attached the original and not the
screenshot). The correct screenshot is attached
  

John: OK, now I finally see it. Antoine: Do these artifacts
disappear if you comment out the imshow call?

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328

De Pauw Antoine wrote:

Jeff,

Thanks for the tip, it's now working perfectly

However, there's still that border with the imshow plot, and I think it
would be good to have it transparent

There's a zoomed picture I made:
http://img218.imageshack.us/img218/5833/imshowborderxz9.png

You see the shadow around the data...

It would be nice for next releases of Matplotlib to get rid of that, but I'm
not able to patch it myself or so... I know there's still a lot of work with
the lib but keep the good work, it is really fantastic

Thanks for your help!

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Universit� Libre de Bruxelles - ULB
  
Antoine: I thought we agreed that it's not an imshow bug - but rather due to the griddata gridding procedure returning missing values outside the convex hull of the input data. Do you disagree? I see no such border around an imshow plot that contains no missing values. If you shrink the size of the map plotting region so it's fully within the convex hull of the data, the border disappears.

-Jeff

···

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: jeudi 25 septembre 2008 14:15
To: De Pauw Antoine
Cc: 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Hi Jeff,

I finally found out how to fill my figure with a background color using
axes.set_axis_bgcolor(color), but I'm facing the following problem now:

How could I get the lower color of a colormap? This is quite undocumented
and I don�t know the colormap properties I could use for that

I know there must be an accessible value somewhere, like for the
ax.get_yticklabels() you gave me

If someone had the clue, my problems would then be completely solved

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Universit� Libre de Bruxelles - ULB
  
Antoine: To get the RGBA value associated with a particular data value, just call the colormap as a function as pass it that value. For example

>>> import matplotlib.pyplot as plt
>>> plt.cm.jet(1)
(0.0, 0.0, 0.517825311942959, 1.0)

BTW: the 'fill_color' kwarg of drawmapboundary basemap method allows you to set the background color of the map.

http://matplotlib.sourceforge.net/basemap/doc/html/api/basemap_api.html

It fills only the map region (which for some projections, like the orthographic, is not the same as the axes region).

-Jeff
  

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: mardi 23 septembre 2008 20:38
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

I still don't know how to either remove this artifact or fill my arrays
    

with
  

values to remove empty regions, and I'll make a last attempt to resolve
      

it
  

I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56

The actual code snippet is here:
map plotting python code (temporary) - Python Snipplr Social Repository

I hope you'll be able to reproduce it, I set the cmap to winter for you
      

to
  

see the gap... setting it to hot will make the grayish border visible in
high resolution by zooming it... I think the border (not the empty zone)
could be an artifact with the hot colormap

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Universit� Libre de Bruxelles - ULB

Antoine: Here is a version that just plots the pixels directly, without interpolating to a grid. I personally like this better, since you can easily see where you actually have data.

HTH,

-Jeff

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
import os
fileName = '20080821.b56'
titre='SO2'
legende='Delta Brightness Temperature (K)'
nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:]))
rawfile=np.fromfile(open(fileName,'rb'),'<d',-1)
Lat=rawfile[0:nbreligne]
Lon=rawfile[nbreligne:nbreligne*2]
Val=rawfile[nbreligne*21:nbreligne*22]
map=Basemap(projection='mill',llcrnrlat=-90,urcrnrlat=90,\
            urcrnrlon=180,llcrnrlon=-180,resolution='l')
x, y = map(Lon, Lat)

plt.scatter(x,y,s=25,c=Val,marker='s',edgecolor="None",cmap=plt.cm.winter,vm
  

in=-5,vmax=-1.2, alpha=0.5)
cb=plt.colorbar(shrink=0.6)
cb.ax.set_ylabel(legende,fontsize=11)
for t in cb.ax.get_yticklabels():
    t.set_fontsize(7)
meridians = np.arange(-180,180,60)
parallels = np.arange(-90,90,30)
map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25)
map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25)
map.drawcoastlines(0.25,antialiased=1)
plt.title(titre)
plt.show()
  

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: lundi 22 septembre 2008 13:59
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

I included here a figure where you'll see the border problem for imshow
      

in
  

my case

http://img217.imageshack.us/img217/5240/testfigzp3.png

The border wraps at -180 and 180 to form the white line

PS: it is atmospheric ice and not SO2, I just omitted to change the
        

title
  

^^
  

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Universit� Libre de Bruxelles - ULB
  

Antoine: I hate to keep repeating myself - but we can't do much if you don't provide a self-contained script, that I can run, which reproduces the problem. My guess is that the line along the dateline, and the point at the South Pole are missing values (which griddata set to missing because they are outside the extent of the data) - but that's just a guess until I can reproduce it.

-Jeff
  

-----Original Message-----
From: Antoine De Pauw [mailto:andepauw@…2144…] Sent: jeudi 18 septembre 2008 17:23
To: Jeff Whitaker; andepauw@...2144...
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: re:Re: [Matplotlib-users] Information request

Jeff,

No the example doesn't show that line

If I reduce the amount of data, the border will be on every side of the
    

plot
  

I'll show you an orthographic plot with no maskinf tomorrow and you will
    

see
  

the problem easily, it wraps in a white line along the 0� meridian and a
white circle in the pole

I think it's the imshow layer that is not totally transparent on the map
background.. I tried every trick I could for example to put some
    

zero-valued
  

points on each corner to make imshow interpolate correctly the sides,
        

but
  

that doesn't make any difference

De Pauw Antoine wrote:
    

Jeff,

Yes they disappear, and they fluctuate with the interpolation method
        

used
  

For example, nearest interpolation don't show the line

Also, if I reduce the grid resolution, the line is thicker, and if I
          

use
  

a
  

masked array to get rid of undesired values, the border shows really
strongly

Here's an example everyone will see:

http://img225.imageshack.us/img225/2671/testfigep2.png

(everything except the clouds is noise)

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry
          

and
  

photophysics laboratory
Universit� Libre de Bruxelles - ULB
  

Antoine: Sorry to seem dense, but I don't see anything wrong with that
          
plot. I see a white border along the north and south pole, but I intrepret that to be missing values. However, my eyes are notoriously bad. I'd like to be to run a script that generates the artifacts myself, so I can zoom in and see the problem myself. Does the griddata_demo.py script show the same problem for you?

-Jeff
    

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: mercredi 17 septembre 2008 19:05
To: John Hunter
Cc: De Pauw Antoine; Matplotlib Users
Subject: Re: [Matplotlib-users] Information request

John Hunter wrote:
  

On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jdh2358@...287...> >>>>>>> >>>>>>> >>>>>>> >>> wrote:
  

Attached is a screenshot (zoom.png) from the gimp, zoomed in near
                

the
  

axes border. The black horizontal line is the top axes border, the
horizontal grey line is the artifact, the vertical dashed line is a
grid line. I don't know if this offers a clue, but if you look at a
zoom in the upper right corner, the grey line seems to break up and
curve down and to the right (corner.png)
    

Sorry, screwed up corner.png (I attached the original and not the
screenshot). The correct screenshot is attached
  

John: OK, now I finally see it. Antoine: Do these artifacts disappear if you comment out the imshow call?

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328

Jeff,

I totally agree this is due to missing values

Again I've got difficulties to find good words so forgive me, what I tried
to say is that the ability to have that border transparent would be a good
feature in next releases, for people who need to interpolate and plot such
data and have an aesthetic result

Imshow is the ideal candidate for satellite data as it has some nice
interpolation features and it is fast, so it can be batch-run on the server
every time we receive data, without too much computation time

The alternative I'm using now is a double or quadruple size grid to reduce
the width of that border, with background color set to the lower colormap
color

That way, the border is really hard to see and it makes (almost) quality
plots for publications

···

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: Thursday, 25 September, 2008 15:34
To: De Pauw Antoine
Cc: 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:

Jeff,

Thanks for the tip, it's now working perfectly

However, there's still that border with the imshow plot, and I think it
would be good to have it transparent

There's a zoomed picture I made:
http://img218.imageshack.us/img218/5833/imshowborderxz9.png

You see the shadow around the data...

It would be nice for next releases of Matplotlib to get rid of that, but

I'm

not able to patch it myself or so... I know there's still a lot of work

with

the lib but keep the good work, it is really fantastic

Thanks for your help!

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  
Antoine: I thought we agreed that it's not an imshow bug - but rather
due to the griddata gridding procedure returning missing values outside
the convex hull of the input data. Do you disagree? I see no such border
around an imshow plot that contains no missing values. If you shrink the
size of the map plotting region so it's fully within the convex hull of
the data, the border disappears.

-Jeff

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: jeudi 25 septembre 2008 14:15
To: De Pauw Antoine
Cc: 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Hi Jeff,

I finally found out how to fill my figure with a background color using
axes.set_axis_bgcolor(color), but I'm facing the following problem now:

How could I get the lower color of a colormap? This is quite undocumented
and I don’t know the colormap properties I could use for that

I know there must be an accessible value somewhere, like for the
ax.get_yticklabels() you gave me

If someone had the clue, my problems would then be completely solved

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
  
Antoine: To get the RGBA value associated with a particular data value,
just call the colormap as a function as pass it that value. For example

>>> import matplotlib.pyplot as plt
>>> plt.cm.jet(1)
(0.0, 0.0, 0.517825311942959, 1.0)

BTW: the 'fill_color' kwarg of drawmapboundary basemap method allows you
to set the background color of the map.

http://matplotlib.sourceforge.net/basemap/doc/html/api/basemap_api.html

It fills only the map region (which for some projections, like the
orthographic, is not the same as the axes region).

-Jeff
  

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: mardi 23 septembre 2008 20:38
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

I still don't know how to either remove this artifact or fill my arrays
    

with
  

values to remove empty regions, and I'll make a last attempt to resolve
      

it
  

I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56

The actual code snippet is here:
map plotting python code (temporary) - Python Snipplr Social Repository

I hope you'll be able to reproduce it, I set the cmap to winter for you
      

to
  

see the gap... setting it to hot will make the grayish border visible in
high resolution by zooming it... I think the border (not the empty zone)
could be an artifact with the hot colormap

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB

Antoine: Here is a version that just plots the pixels directly, without
interpolating to a grid. I personally like this better, since you can
easily see where you actually have data.

HTH,

-Jeff

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
import os
fileName = '20080821.b56'
titre='SO2'
legende='Delta Brightness Temperature (K)'
nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:]))
rawfile=np.fromfile(open(fileName,'rb'),'<d',-1)
Lat=rawfile[0:nbreligne]
Lon=rawfile[nbreligne:nbreligne*2]
Val=rawfile[nbreligne*21:nbreligne*22]
map=Basemap(projection='mill',llcrnrlat=-90,urcrnrlat=90,\
            urcrnrlon=180,llcrnrlon=-180,resolution='l')
x, y = map(Lon, Lat)

plt.scatter(x,y,s=25,c=Val,marker='s',edgecolor="None",cmap=plt.cm.winter,vm

  

in=-5,vmax=-1.2,
alpha=0.5)
cb=plt.colorbar(shrink=0.6)
cb.ax.set_ylabel(legende,fontsize=11)
for t in cb.ax.get_yticklabels():
    t.set_fontsize(7)
meridians = np.arange(-180,180,60)
parallels = np.arange(-90,90,30)
map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25)
map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25)
map.drawcoastlines(0.25,antialiased=1)
plt.title(titre)
plt.show()
  

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: lundi 22 septembre 2008 13:59
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

I included here a figure where you'll see the border problem for imshow
      

in
  

my case

http://img217.imageshack.us/img217/5240/testfigzp3.png

The border wraps at -180 and 180 to form the white line

PS: it is atmospheric ice and not SO2, I just omitted to change the
        

title
  

^^
  

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry

and

photophysics laboratory
Université Libre de Bruxelles - ULB
  

Antoine: I hate to keep repeating myself - but we can't do much if you
don't provide a self-contained script, that I can run, which reproduces
the problem. My guess is that the line along the dateline, and the
point at the South Pole are missing values (which griddata set to
missing because they are outside the extent of the data) - but that's
just a guess until I can reproduce it.

-Jeff
  

-----Original Message-----
From: Antoine De Pauw [mailto:andepauw@…2144…]
Sent: jeudi 18 septembre 2008 17:23
To: Jeff Whitaker; andepauw@...2144...
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: re:Re: [Matplotlib-users] Information request

Jeff,

No the example doesn't show that line

If I reduce the amount of data, the border will be on every side of the
    

plot
  

I'll show you an orthographic plot with no maskinf tomorrow and you

will

    

see
  

the problem easily, it wraps in a white line along the 0° meridian and

a

white circle in the pole

I think it's the imshow layer that is not totally transparent on the

map

background.. I tried every trick I could for example to put some
    

zero-valued
  

points on each corner to make imshow interpolate correctly the sides,
        

but
  

that doesn't make any difference

De Pauw Antoine wrote:
    

Jeff,

Yes they disappear, and they fluctuate with the interpolation method
        

used
  

For example, nearest interpolation don't show the line

Also, if I reduce the grid resolution, the line is thicker, and if I
          

use
  

a
  

masked array to get rid of undesired values, the border shows really
strongly

Here's an example everyone will see:

http://img225.imageshack.us/img225/2671/testfigep2.png

(everything except the clouds is noise)

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry
          

and
  

photophysics laboratory
Université Libre de Bruxelles - ULB
  

Antoine: Sorry to seem dense, but I don't see anything wrong with

that

          
plot. I see a white border along the north and south pole, but I
intrepret that to be missing values. However, my eyes are notoriously

bad. I'd like to be to run a script that generates the artifacts
myself, so I can zoom in and see the problem myself. Does the
griddata_demo.py script show the same problem for you?

-Jeff
    

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…]
Sent: mercredi 17 septembre 2008 19:05
To: John Hunter
Cc: De Pauw Antoine; Matplotlib Users
Subject: Re: [Matplotlib-users] Information request

John Hunter wrote:
  

On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jdh2358@...287...> >>>>>>> >>>>>>> >>>>>>> >>> wrote:
  

Attached is a screenshot (zoom.png) from the gimp, zoomed in near
                

the
  

axes border. The black horizontal line is the top axes border, the
horizontal grey line is the artifact, the vertical dashed line is a
grid line. I don't know if this offers a clue, but if you look at

a

zoom in the upper right corner, the grey line seems to break up

and

curve down and to the right (corner.png)
    

Sorry, screwed up corner.png (I attached the original and not the
screenshot). The correct screenshot is attached
  

John: OK, now I finally see it. Antoine: Do these artifacts
disappear if you comment out the imshow call?

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328

Antoine De Pauw wrote:

Jeff,

I totally agree this is due to missing values

Again I've got difficulties to find good words so forgive me, what I tried
to say is that the ability to have that border transparent would be a good
feature in next releases, for people who need to interpolate and plot such
data and have an aesthetic result
  
Antoine: First of all, let's not call it a 'border' - it happens to show up around the border of the image in your case, but fundamentally it's just missing pixels in the image. The missing pixels are already transparent - what you're seeing is the axes background showing through the missing values.
Imshow is the ideal candidate for satellite data as it has some nice
interpolation features and it is fast, so it can be batch-run on the server
every time we receive data, without too much computation time

The alternative I'm using now is a double or quadruple size grid to reduce
the width of that border, with background color set to the lower colormap
color

That way, the border is really hard to see and it makes (almost) quality
plots for publications
  

I think you're already doing everything that can be done - aside from making the plot region smaller so it's inside the convex hull of the data and there are no missing values. I don't see how changing the behavior of imshow would help you any further.

-Jeff

···

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: Thursday, 25 September, 2008 15:34
To: De Pauw Antoine
Cc: 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

Thanks for the tip, it's now working perfectly

However, there's still that border with the imshow plot, and I think it
would be good to have it transparent

There's a zoomed picture I made:
http://img218.imageshack.us/img218/5833/imshowborderxz9.png

You see the shadow around the data...

It would be nice for next releases of Matplotlib to get rid of that, but
    

I'm
  

not able to patch it myself or so... I know there's still a lot of work
    

with
  

the lib but keep the good work, it is really fantastic

Thanks for your help!

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Universit� Libre de Bruxelles - ULB
  
Antoine: I thought we agreed that it's not an imshow bug - but rather due to the griddata gridding procedure returning missing values outside the convex hull of the input data. Do you disagree? I see no such border around an imshow plot that contains no missing values. If you shrink the size of the map plotting region so it's fully within the convex hull of the data, the border disappears.

-Jeff
  

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: jeudi 25 septembre 2008 14:15
To: De Pauw Antoine
Cc: 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Hi Jeff,

I finally found out how to fill my figure with a background color using
axes.set_axis_bgcolor(color), but I'm facing the following problem now:

How could I get the lower color of a colormap? This is quite undocumented
and I don�t know the colormap properties I could use for that

I know there must be an accessible value somewhere, like for the
ax.get_yticklabels() you gave me

If someone had the clue, my problems would then be completely solved

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Universit� Libre de Bruxelles - ULB
  

Antoine: To get the RGBA value associated with a particular data value, just call the colormap as a function as pass it that value. For example

>>> import matplotlib.pyplot as plt
>>> plt.cm.jet(1)
(0.0, 0.0, 0.517825311942959, 1.0)

BTW: the 'fill_color' kwarg of drawmapboundary basemap method allows you to set the background color of the map.

http://matplotlib.sourceforge.net/basemap/doc/html/api/basemap_api.html

It fills only the map region (which for some projections, like the orthographic, is not the same as the axes region).

-Jeff
  

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: mardi 23 septembre 2008 20:38
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

I still don't know how to either remove this artifact or fill my arrays
    

with
  

values to remove empty regions, and I'll make a last attempt to resolve
      

it
  

I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56

The actual code snippet is here:
map plotting python code (temporary) - Python Snipplr Social Repository

I hope you'll be able to reproduce it, I set the cmap to winter for you
      

to
  

see the gap... setting it to hot will make the grayish border visible in
high resolution by zooming it... I think the border (not the empty zone)
could be an artifact with the hot colormap

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Universit� Libre de Bruxelles - ULB

Antoine: Here is a version that just plots the pixels directly, without interpolating to a grid. I personally like this better, since you can easily see where you actually have data.

HTH,

-Jeff

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
import os
fileName = '20080821.b56'
titre='SO2'
legende='Delta Brightness Temperature (K)'
nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:]))
rawfile=np.fromfile(open(fileName,'rb'),'<d',-1)
Lat=rawfile[0:nbreligne]
Lon=rawfile[nbreligne:nbreligne*2]
Val=rawfile[nbreligne*21:nbreligne*22]
map=Basemap(projection='mill',llcrnrlat=-90,urcrnrlat=90,\
            urcrnrlon=180,llcrnrlon=-180,resolution='l')
x, y = map(Lon, Lat)

plt.scatter(x,y,s=25,c=Val,marker='s',edgecolor="None",cmap=plt.cm.winter,vm
  

in=-5,vmax=-1.2, alpha=0.5)
cb=plt.colorbar(shrink=0.6)
cb.ax.set_ylabel(legende,fontsize=11)
for t in cb.ax.get_yticklabels():
    t.set_fontsize(7)
meridians = np.arange(-180,180,60)
parallels = np.arange(-90,90,30)
map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25)
map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25)
map.drawcoastlines(0.25,antialiased=1)
plt.title(titre)
plt.show()
  

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: lundi 22 septembre 2008 13:59
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request

De Pauw Antoine wrote:
  

Jeff,

I included here a figure where you'll see the border problem for imshow
      

in
  

my case

http://img217.imageshack.us/img217/5240/testfigzp3.png

The border wraps at -180 and 180 to form the white line

PS: it is atmospheric ice and not SO2, I just omitted to change the
        

title
  

^^
  

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry
          

and
  

photophysics laboratory
Universit� Libre de Bruxelles - ULB
  

Antoine: I hate to keep repeating myself - but we can't do much if you don't provide a self-contained script, that I can run, which reproduces the problem. My guess is that the line along the dateline, and the point at the South Pole are missing values (which griddata set to missing because they are outside the extent of the data) - but that's just a guess until I can reproduce it.

-Jeff
  

-----Original Message-----
From: Antoine De Pauw [mailto:andepauw@…2144…] Sent: jeudi 18 septembre 2008 17:23
To: Jeff Whitaker; andepauw@...2144...
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: re:Re: [Matplotlib-users] Information request

Jeff,

No the example doesn't show that line

If I reduce the amount of data, the border will be on every side of the
    

plot
  

I'll show you an orthographic plot with no maskinf tomorrow and you
          

will
  

see
  

the problem easily, it wraps in a white line along the 0� meridian and
          

a
  

white circle in the pole

I think it's the imshow layer that is not totally transparent on the
          

map
  

background.. I tried every trick I could for example to put some
    

zero-valued
  

points on each corner to make imshow interpolate correctly the sides,
        

but
  

that doesn't make any difference

De Pauw Antoine wrote:
    

Jeff,

Yes they disappear, and they fluctuate with the interpolation method
        

used
  

For example, nearest interpolation don't show the line

Also, if I reduce the grid resolution, the line is thicker, and if I
          

use
  

a
  

masked array to get rid of undesired values, the border shows really
strongly

Here's an example everyone will see:

http://img225.imageshack.us/img225/2671/testfigep2.png

(everything except the clouds is noise)

Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry
          

and
  

photophysics laboratory
Universit� Libre de Bruxelles - ULB
  

Antoine: Sorry to seem dense, but I don't see anything wrong with
            

that
  

plot. I see a white border along the north and south pole, but I intrepret that to be missing values. However, my eyes are notoriously
            
bad. I'd like to be to run a script that generates the artifacts myself, so I can zoom in and see the problem myself. Does the griddata_demo.py script show the same problem for you?

-Jeff
    

-----Original Message-----
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: mercredi 17 septembre 2008 19:05
To: John Hunter
Cc: De Pauw Antoine; Matplotlib Users
Subject: Re: [Matplotlib-users] Information request

John Hunter wrote:
  

On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jdh2358@...287...>
          

wrote:
  

Attached is a screenshot (zoom.png) from the gimp, zoomed in near
                

the
  

axes border. The black horizontal line is the top axes border, the
horizontal grey line is the artifact, the vertical dashed line is a
grid line. I don't know if this offers a clue, but if you look at
                  

a
  

zoom in the upper right corner, the grey line seems to break up
                  

and
  

curve down and to the right (corner.png)
    

Sorry, screwed up corner.png (I attached the original and not the
screenshot). The correct screenshot is attached
  

John: OK, now I finally see it. Antoine: Do these artifacts disappear if you comment out the imshow call?

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328