From: Curtis C. <cu...@hi...> - 2004-07-19 18:12:50
|
Hi, I have been using the colorbar() method along with pcolor to make image plots of data. Normally, the colorbar legend is correct. However, when the range of numbers to plot is less than 1, such as 10^-3 - 2*10^-3, the colorbar labels just show up as 0.0 on the top and bottom. Thanks, Curtis |
From: Curtis C. <cu...@hi...> - 2004-07-20 18:58:48
|
Hi all, I have a fix for the problem mentioned. In the latest release, subdir matploblib-0.60.2/matplotlib/matlab.py line 542 there is a bug. It should read: cax.set_yticklabels([tickfmt%tick for tick in cticks]) instead of cax.set_yticklabels(['%1.1f'%tick for tick in cticks]) so as to take advantage of the optional input parameter tickfmt (format specifier) for the colorbar labels. With this change, the colorbar labels come out fine and adjust properly according to the input format specifier. Thanks, Curtis |
From: Curtis C. <cu...@hi...> - 2004-09-28 20:06:07
|
I reported this bug July 19 for an earlier version of Matplotlib, but it is still relevent through Matplotlib v. 0.62-4: > I have been using the colorbar() method along with pcolor to make image > plots of data. Normally, the colorbar legend is correct. However, when > the range of numbers to plot is less than 1, such as 10^-3 - 2*10^-3, the > colorbar labels just show up as 0.0 on the top and bottom. The key will be to get the tickfmt option into the colorbar() function working properly. Cheers, Curtis |
From: John H. <jdh...@ac...> - 2004-09-29 02:32:59
|
>>>>> "Curtis" == Curtis Cooper <cu...@hi...> writes: Curtis> I reported this bug July 19 for an earlier version of Curtis> Matplotlib, but it is still relevent through Matplotlib Curtis> v. 0.62-4: Could you test this with 0.63 and if the problem persists post a minimal script that exposes the bug? Thanks, JDH |
From: Curtis C. <cu...@hi...> - 2004-09-30 10:54:56
|
> Could you test this with 0.63 and if the problem persists post a > minimal script that exposes the bug? In matplotlib-0.63.0, I can't even get the examples pcolor_demo.py and pcolor_demo2.py to work properly. My code mimics these examples closely. Once they are working again, I will send you an example of the colorbar tick format issue. Cheers, Curtis |
From: John H. <jdh...@ac...> - 2004-09-30 14:31:04
|
>>>>> "Curtis" == Curtis Cooper <cu...@hi...> writes: >> Could you test this with 0.63 and if the problem persists post >> a minimal script that exposes the bug? Curtis> In matplotlib-0.63.0, I can't even get the examples Curtis> pcolor_demo.py and pcolor_demo2.py to work properly. My Curtis> code mimics these examples closely. Once they are working Curtis> again, I will send you an example of the colorbar tick Curtis> format issue. Strange. pcolor_demo.py and pcolor_demo2.py work fine for me on linux and win32. Try rm -rf site-packages/matplotlib and the 'build' dir of your matplotlib install tree, and reinstall. What, by the way, does it mean to "not work properly". Is this a crash? Note an image interpolation bug was fixed in 0.63.0 which will cause the axes limits to be a little different for imshow calls than they were before. Earlier versions of matplotlib set the viewlim to hide the edge artifacts, which no longer exist. JDH |
From: Curtis C. <cu...@hi...> - 2004-09-30 17:08:53
|
> Try rm -rf site-packages/matplotlib and the 'build' dir of your > matplotlib install tree, and reinstall. This worked. I didn't realize I had to delete the site-packages/matplotlib before installing over an old version. |
From: John H. <jdh...@ac...> - 2004-09-30 17:25:27
|
>>>>> "Curtis" == Curtis Cooper <cu...@hi...> writes: Curtis> This worked. I didn't realize I had to delete the Curtis> site-packages/matplotlib before installing over an old Curtis> version. You don't normally, but this is usually my first line of defense when something fails in one place that isn't failing in another. So does the colorbar bug persist? JDH |
From: Curtis C. <cu...@hi...> - 2004-09-30 20:50:39
|
> So does the colorbar bug persist? > It appears to have been fixed! The colorbar labeling automatically determines the appropriate number of digits (or if scientific notation is necessary) for the text labels on the colorbar. You might want to activate the tickfmt optional parameter that is still present in the source code, as this gives the user direct control over the number of digits displayed, but at least the labels can be distinguished in the current version of the library. Thanks! Curtis |