{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/basemap/issues/229","labels_url":"https://api.github.com/repos/matplotlib/basemap/issues/229/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/basemap/issues/229/comments","events_url":"https://api.github.com/repos/matplotlib/basemap/issues/229/events","html_url":"https://github.com/matplotlib/basemap/issues/229","id":118427800,"number":229,"title":"contour and contourf produce conflicing results for certain projections","user":{"login":"jhcsu","id":8312113,"avatar_url":"https://avatars.githubusercontent.com/u/8312113?v=3","gravatar_id":"","url":"https://api.github.com/users/jhcsu","html_url":"https://github.com/jhcsu","followers_url":"https://api.github.com/users/jhcsu/followers","following_url":"https://api.github.com/users/jhcsu/following{/other_user}","gists_url":"https://api.github.com/users/jhcsu/gists{/gist_id}","starred_url":"https://api.github.com/users/jhcsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhcsu/subscriptions","organizations_url":"https://api.github.com/users/jhcsu/orgs","repos_url":"https://api.github.com/users/jhcsu/repos","events_url":"https://api.github.com/users/jhcsu/events{/privacy}","received_events_url":"https://api.github.com/users/jhcsu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-23T17:15:13Z","updated_at":"2015-11-23T18:06:03Z","closed_at":null,"body":"Originally posted [here](http://stackoverflow.com/questions/33850052/matplotlib-why-inconsistent-results-between-contour-and-contourf) because I wasn't convinced it was a bug (I'm new to matplotlib)... but I'm increasingly convinced it is a bug, so here we are.\r\n\r\nI'm plotting some NCEP temperature anomaly data using the stereographic projection. When I plot the data with filled contours, contourf, I see the first picture below. Note the red (positive values) over most of North America. When I change contourf to contour, making no other changes, I see the second picture below. Note the streak of blue (negative values) over central North America.\r\n\r\n![img1](http://i.stack.imgur.com/i74UW.png)![img2](http://i.stack.imgur.com/ZkBJI.png)\r\n\r\nThe contour result with the blue is what is actually in the data, and therefore what I expect to see. The contourf result is not what I expect. Is this a bug, or am I using these tools improperly?\r\n\r\nThe python code is reproduced below... you can obtain the data as a small binary file [here](https://onedrive.live.com/redir?resid=9F18EDDCF4E99E72!108&authkey=!ADXWQucUMyXgkJk&ithint=file%2cbin) if you want to try it yourself.\r\n\r\nSome more notes... (1) shifting the longitude range to -180 to 180 using `addcyclic` and `shiftgrid` does not help. (2) the Lambert Conformal ('lcc') projection produces results that are *less* wrong, but still not correct, when using contourf. (3) the Alberts Equal Area ('aea') projection centered on North America looks correct, however when I use the North Pole-centric version ('nplaea') I only see correct results for certain values of `lon_0`.  I am happy to provide an example if this turns out to be a different issue.\r\n\r\n    import numpy as np\r\n    import matplotlib.pyplot as plt\r\n\r\n    # read data\r\n\r\n    f = open('data5.bin', 'r')\r\n    lat = np.fromfile(f,dtype=np.float32,count=73)\r\n    lon = np.fromfile(f,dtype=np.float32,count=144)\r\n    data = np.reshape(np.fromfile(f,dtype=np.float32,count=-1),(73,144))\r\n    f.close()\r\n\r\n    # plot\r\n\r\n    m = Basemap(width=10000000,height=6000000,\r\n            resolution='l',projection='stere',\\\r\n            lat_ts=50,lat_0=50,lon_0=253)\r\n    m.drawcoastlines()\r\n    lon2d, lat2d = np.meshgrid(lon,lat)\r\n    x, y = m(lon2d,lat2d)\r\n    mymap = plt.contourf(x,y,data,levels=np.arange(17)-8,cmap=plt.cm.bwr)\r\n    plt.colorbar(mymap,orientation='vertical',shrink=0.75)\r\n    plt.show()"},"comment":{"url":"https://api.github.com/repos/matplotlib/basemap/issues/comments/159014380","html_url":"https://github.com/matplotlib/basemap/issues/229#issuecomment-159014380","issue_url":"https://api.github.com/repos/matplotlib/basemap/issues/229","id":159014380,"user":{"login":"jhcsu","id":8312113,"avatar_url":"https://avatars.githubusercontent.com/u/8312113?v=3","gravatar_id":"","url":"https://api.github.com/users/jhcsu","html_url":"https://github.com/jhcsu","followers_url":"https://api.github.com/users/jhcsu/followers","following_url":"https://api.github.com/users/jhcsu/following{/other_user}","gists_url":"https://api.github.com/users/jhcsu/gists{/gist_id}","starred_url":"https://api.github.com/users/jhcsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhcsu/subscriptions","organizations_url":"https://api.github.com/users/jhcsu/orgs","repos_url":"https://api.github.com/users/jhcsu/repos","events_url":"https://api.github.com/users/jhcsu/events{/privacy}","received_events_url":"https://api.github.com/users/jhcsu/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T18:06:03Z","updated_at":"2015-11-23T18:06:03Z","body":"The negative values shown in the blue contours are not particularly small.  The value at 50 degrees north, 255 degrees east (southern Saskatchewan), for example, is approximately -2.4:\r\n\r\n    print (lat[16], lon[102], data[16,102])\r\n    (50.0, 255.0, -2.4153743)"}}