Re: [Matplotlib-users] Colorbar interfering with figure

2012-02-15 Thread Benjamin Root
On Mon, Feb 13, 2012 at 10:38 AM, Bruce Ford br...@clearscienceinc.comwrote: I have a application that plots figures on demand. I'm running into an issue when plotting more than one parameter on a figure. Each parameter is run through libraries that I've written that make decisions and

Re: [Matplotlib-users] Colorbar on each subplot

2012-01-07 Thread Jae-Joon Lee
Please post a complete (but simple) example that we can easily test. Doing the *subplot_adjust* will mess up the location of colorbars, but I believe that colorbars should be still there. If you're using v1.1 and later, see if using the use_gridspec parameter works. For example,

Re: [Matplotlib-users] Colorbar on each subplot

2012-01-07 Thread Benjamin Root
On Saturday, January 7, 2012, Jae-Joon Lee lee.j.j...@gmail.com wrote: Please post a complete (but simple) example that we can easily test. Doing the *subplot_adjust* will mess up the location of colorbars, but I believe that colorbars should be still there. If you're using v1.1 and later, see

Re: [Matplotlib-users] Colorbar labels never appear vertically

2011-08-19 Thread Eric Firing
On 08/18/2011 09:53 PM, James McMurray wrote: Hi, I am having a problem where the colorbar labels will never appear vertically, even when their rotation is specified as vertical. As you can see in the screenshot here: http://minus.com/lbOJyOljH this creates problems when the labels are cut

Re: [Matplotlib-users] Colorbar labels never appear vertically

2011-08-19 Thread James McMurray
I made this standalone script here: http://pastebin.com/AnKeCwiU and this does not suffer from the issue. For comparison here is the plotting function in my program: http://pastebin.com/7xxtPQYb The only major difference is the use of the interactive display in the script, against the use of

Re: [Matplotlib-users] Colorbar labels never appear vertically

2011-08-19 Thread James McMurray
After some testing, it appears to be caused by the use of LaTeX in the labels which then prevents it from being rotated (but only inside the GTK application). I have no idea why this is only occurring when it is not in interactive mode, but I guess for the time being I can just try not to use

Re: [Matplotlib-users] Colorbar labels never appear vertically

2011-08-19 Thread Eric Firing
On 08/18/2011 10:57 PM, James McMurray wrote: I made this standalone script here: http://pastebin.com/AnKeCwiU and this does not suffer from the issue. For comparison here is the plotting function in my program: http://pastebin.com/7xxtPQYb The problem is that the Gtk backend does not support

Re: [Matplotlib-users] colorbar() moves to wrong place on subplots_adjust call

2011-06-16 Thread Jae-Joon Lee
On Tue, Jun 14, 2011 at 4:58 AM, Nicholas Devenish misnomer+matplot...@gmail.com wrote: Is there a way I can avoid or correct this behaviour? It certainly seems erroneous that using the figure GUI to adjust plot bounds doesn't work, and is an especially nice way of tweaking for final plots.

Re: [Matplotlib-users] colorbar and scilimits

2011-03-23 Thread Jae-Joon Lee
Unfortunately, ticks in colorbar axes work differently. Use something like below instead. cb.formatter.set_scientific(True) cb.formatter.set_powerlimits((0,4)) cb.update_ticks() Regards, -JJ On Mon, Mar 21, 2011 at 11:26 PM, johanngoetz jgo...@ucla.edu wrote: Is there a way to set the

Re: [Matplotlib-users] colorbar+log+latex

2011-01-26 Thread Shrividya Ravi
Hi All, Thanks a bunch for your help! Eric: your suggestion works brilliantly ( I didn't use the interpolation kwarg though because I like the 'smudged' look). Paul: thanks for your suggestions but I get errors when trying to execute * cbar.set_ticks(np.linspace(300,350,6))*. The c.bar.set_ticks

Re: [Matplotlib-users] colorbar+log+latex

2011-01-25 Thread Shrividya Ravi
Hi there, I too want a log scale on the colorbar for an imshow plot. I have tried the solution proposed by Jae-Joon but I cannot get the ticklabels to show. I have tried to dynamically change the matplotlibrc settings in ipython using mpl.rc('text',usetex=True) - where mpl = matplotlib. When I run

Re: [Matplotlib-users] colorbar+log+latex

2011-01-25 Thread Eric Firing
On 01/25/2011 06:58 PM, Shrividya Ravi wrote: [...] On the same topic of the colorbar, how can I readjust the colors such that it only goes between user-specified values? For example, I have one imshow plot where the values range between 0 and 350. However, I only want to look at the values

Re: [Matplotlib-users] colorbar+log+latex

2011-01-25 Thread Paul Ivanov
Eric Firing, on 2011-01-25 19:52, wrote: On 01/25/2011 06:58 PM, Shrividya Ravi wrote: [...] On the same topic of the colorbar, how can I readjust the colors such that it only goes between user-specified values? For example, I have one imshow plot where the values range between 0 and 350.

Re: [Matplotlib-users] colorbar+log+latex

2011-01-25 Thread Eric Firing
On 01/25/2011 08:51 PM, Paul Ivanov wrote: Eric Firing, on 2011-01-25 19:52, wrote: On 01/25/2011 06:58 PM, Shrividya Ravi wrote: [...] On the same topic of the colorbar, how can I readjust the colors such that it only goes between user-specified values? For example, I have one imshow plot

Re: [Matplotlib-users] colorbar with Axes3D for a set of collections?

2011-01-14 Thread Daniel Mader
Hi Eric, thanks for your feedback, it helped a lot! I have some questions left, see below. 2011/1/14 Eric Firing efir...@hawaii.edu: Quick thoughts with no testing or concrete examples: 1) Don't set the cmap or norm for the colorbar; let it inherit those properties from the mappable to which

Re: [Matplotlib-users] colorbar with Axes3D for a set of collections?

2011-01-14 Thread Eric Firing
On 01/14/2011 02:02 AM, Daniel Mader wrote: Hi Eric, thanks for your feedback, it helped a lot! I have some questions left, see below. 2011/1/14 Eric Firingefir...@hawaii.edu: Quick thoughts with no testing or concrete examples: 1) Don't set the cmap or norm for the colorbar; let it inherit

Re: [Matplotlib-users] colorbar with Axes3D for a set of collections?

2011-01-14 Thread Daniel Mader
Thank you very much for your patience, your explanations helped me a very lot in getting beautiful plots for my thesis! Best regards, Daniel -- Protect Your Site and Customers from Malware Attacks Learn about various

Re: [Matplotlib-users] colorbar with Axes3D for a set of collections?

2011-01-13 Thread Eric Firing
On 01/13/2011 01:40 PM, Daniel Mader wrote: Hi, I am trying to plot a set of simulation results of FEM simulations. With a lot of help from Ben I can plot the deformed shape quite nicely but I have trouble in applying a colorbar to the plot. In the attached file there are three results with

Re: [Matplotlib-users] colorbar settings with a object oriented approach (or mixed pyplot)

2010-11-21 Thread Jae-Joon Lee
On Thu, Nov 18, 2010 at 11:10 PM, John washa...@gmail.com wrote: 1) I only need one colorbar, how would I create a single colorbar on the right that spanned across all axes? (ie. same height as the stack) There are a few options you can try. I guess the easiest way is setting up the axes

Re: [Matplotlib-users] colorbar uncentered plots

2010-09-29 Thread Benjamin Root
On Tue, Sep 28, 2010 at 10:56 PM, Philip Vetter pv+matplot...@math.duke.edupv%2bmatplot...@math.duke.edu wrote: Hello! see below for sample code. (1) I find that the second subplot is shifted to the right. This seems to happen generally with colorbar. How do I fix it? (2) is there a way to

Re: [Matplotlib-users] colorbar questions ...

2010-09-14 Thread Oz Nahum
Hi Ben, Thanks for your reply it sure helps. My awkward work around until now was to put before the colorbar: matplotlib.rc('axes',edgecolor='w') and the return it to matplotlib.rc('axes',edgecolor='k'). Does some one knows how to increase the distance between the color bar and the X-axis ? Now

Re: [Matplotlib-users] colorbar questions ...

2010-09-13 Thread Benjamin Root
On Sat, Sep 11, 2010 at 2:10 PM, Oz Nahum nahu...@gmail.com wrote: Hi Everyone again, So, with the weekend comes some time to think and I found an answer to another question of mine. I know now how to remove xticks in colorbar, and I also know how to customize the widths of the lines in

Re: [Matplotlib-users] colorbar questions ...

2010-09-13 Thread Alan G Isaac
On 9/11/2010 3:10 PM, Oz Nahum wrote: my question, how to remove the axes around the colorbar, or at least changed the to be non-visible, still stands... Did you resolve this? Alan Isaac -- Start uncovering the many

Re: [Matplotlib-users] colorbar questions ...

2010-09-11 Thread Oz Nahum
Hi Everyone again, So, with the weekend comes some time to think and I found an answer to another question of mine. I know now how to remove xticks in colorbar, and I also know how to customize the widths of the lines in the color bar. import matplotlib import numpy as np import matplotlib.cm

Re: [Matplotlib-users] Colorbar labeling

2010-08-23 Thread Friedrich Romstedt
2010/8/20 Bruce Ford br...@clearscienceinc.com: I have a grid with values ranging from exactly 0.0 and 100.0.  When I plot this with colorbar, the base of the colorbar is labeled -0.0. Is this a default for 0.0...to plot it with as a negative number?  Any workarounds? How sure are you that

Re: [Matplotlib-users] Colorbar labeling

2010-08-20 Thread Eric Firing
On 08/20/2010 05:29 AM, Bruce Ford wrote: I have a grid with values ranging from exactly 0.0 and 100.0. When I plot this with colorbar, the base of the colorbar is labeled -0.0. Is this a default for 0.0...to plot it with as a negative number? Any workarounds? Would you provide a minimal

Re: [Matplotlib-users] Colorbar labeling

2010-08-20 Thread Bruce Ford
This effect is happening within an web app that displays gridded fields from multiple datasets (~4500 lines of code). So I it's tricky to create an example. Although if I use numpy.min(grid) the minimum is 0. So, I think colorbar or matplotlib is interpreting the 0 as -0. (Matplotlib version

Re: [Matplotlib-users] Colorbar labeling

2010-08-20 Thread Eric Firing
On 08/20/2010 10:14 AM, Bruce Ford wrote: This effect is happening within an web app that displays gridded fields from multiple datasets (~4500 lines of code). So I it's tricky to create an example. Although if I use numpy.min(grid) the minimum is 0. So, I think colorbar or matplotlib is

Re: [Matplotlib-users] Colorbar labeling

2010-08-20 Thread Bruce Ford
Thanks I'll give this a try. numpy.min(grid) reports 0.0 (no negative) yet it labels as -0.0, BTW, but let me give this a try. Bruce --- Bruce W. Ford Clear Science, Inc. br...@clearscienceinc.com http://www.ClearScienceInc.com

Re: [Matplotlib-users] Colorbar labeling

2010-08-20 Thread Eric Firing
On 08/20/2010 10:51 AM, Bruce Ford wrote: Thanks I'll give this a try. numpy.min(grid) reports 0.0 (no negative) yet it labels as -0.0, BTW, but let me give this a try. Bruce, What matters is not min(grid), but the value of the tick. Unless you are forcing them to be the same via a kwarg

Re: [Matplotlib-users] colorbar rescaling

2010-06-29 Thread Alexander Dietz
Hi Friedrich, thanks a lot, that was exactly what I was looking for... Alex On Mon, Jun 28, 2010 at 23:00, Friedrich Romstedt friedrichromst...@gmail.com wrote: 2010/6/28 Alexander Dietz alexanderdie...@googlemail.com: I have a plot, to which I am drawing a colorbar. The standard colorbar

Re: [Matplotlib-users] colorbar rescaling

2010-06-28 Thread Friedrich Romstedt
2010/6/28 Alexander Dietz alexanderdie...@googlemail.com: I have a plot, to which I am drawing a colorbar. The standard colorbar ranges from the values -1 (blue) over 0 (green) to e.g. 1(red). So far so good. But now I want to change the colorbar that it shows only the colors between 0 and 1.

Re: [Matplotlib-users] colorbar and logscale

2010-06-24 Thread Benjamin Root
Benoit, Is there any particular reason why you can't do a log10() of the data that is being pcolor()'d and then label the colorbar as having units of dB? That would seem to be the most straight-forward approach to me. Ben Root 2010/6/24 Benoit Donnet benoit.don...@uclouvain.be Hi guys,

Re: [Matplotlib-users] colorbar and logscale

2010-06-24 Thread Benoit Donnet
Hello Benjamin, Thanks for your reply. Is there any particular reason why you can't do a log10() of the data that is being pcolor()'d and then label the colorbar as having units of dB? That would seem to be the most straight-forward approach to me. That's what I first tested. In that

Re: [Matplotlib-users] colorbar and logscale

2010-06-24 Thread Benjamin Root
Ah, I just noticed that. Actually, I think I just figured out what is happening. The colorbar automatically chooses what values to display, and in your case, the values are 0.0, -0.4, -0.8, -1.2, -1.6, ..., -3.6, which when turned into integers are 0, 0, 0, -1, -1, ..., -3, which matches what

Re: [Matplotlib-users] colorbar and logscale

2010-06-24 Thread Eric Firing
On 06/24/2010 04:03 AM, Benjamin Root wrote: Ah, I just noticed that. Actually, I think I just figured out what is happening. The colorbar automatically chooses what values to display, and in your case, the values are 0.0, -0.4, -0.8, -1.2, -1.6, ..., -3.6, which when turned into integers

Re: [Matplotlib-users] colorbar+log+latex

2010-04-20 Thread Yves Revaz
Ok, great, it works ! However, I do not understand why latex mode is disabled by default... Anyway, thanks a lot, yves Jae-Joon Lee wrote: I'm not sure if the default formatter needs to be changed. However, you may try import matplotlib.ticker as ticker

Re: [Matplotlib-users] colorbar+log+latex

2010-04-19 Thread Jae-Joon Lee
I'm not sure if the default formatter needs to be changed. However, you may try import matplotlib.ticker as ticker formatter=ticker.LogFormatterMathtext() colorbar(format=formatter) which will render colorbar ticklabels with mathtext mode. Regards, -JJ On Fri, Apr 16, 2010 at 3:56 AM, Yves

Re: [Matplotlib-users] colorbar() and plt.title()

2010-04-04 Thread Claus
Hi, I've got two questions: 1) one is related to colorbar() on multiple subfigures (see code example below): how do I add a scatterplot if I wanted multiple subfigures? Or, what am I doing wrong in the second code example 2) in either of the examples, how can I increase the distance between the

Re: [Matplotlib-users] colorbar() and plt.title()

2010-04-03 Thread Marius 't Hart
Try this: from pylab import * from numpy import * Z = random.randn(100,100) figure() subplot(1,2,1) imgHandle = imshow(Z, cmap=cm.gray) scatter(random.rand(10)*100,random.rand(10)*100) colorbar(imgHandle) title('Hello') show() By the way, I find jet a bad colormap to represent scientific data:

Re: [Matplotlib-users] colorbar on LEFT side of figure ?

2010-03-04 Thread Jeff Whitaker
Jim Vickroy wrote: Hi, I have been unable to place a colorbar on the LEFT side of a figure. For example, in the Gaussian noise with vertical colorbar http://matplotlib.sourceforge.net/examples/pylab_examples/colorbar_tick_labelling_demo.html demo, how can the colorbar be positioned on

Re: [Matplotlib-users] colorbar with date-time formatting

2010-01-15 Thread Jae-Joon Lee
Colorbar axes is a rather special and things need to be set during the initialization. Here is a slightly modified version of your script. While it does not produces error, I'm not sure if the result is correct. -JJ import numpy as np import matplotlib.pyplot as plt from matplotlib.dates

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-07 Thread Alexander Hupfer
@lists.sourceforge.net *Objet :* Re: [Matplotlib-users] Colorbar embedding in qt4 I isolated the problem a bit more. For some reason drawing gets slower and slower with each plot drawn. from os import sys from time import time from PyQt4 import QtGui, QtCore import matplotlib matplotlib.use

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-04 Thread Alexander Hupfer
Ok, here is the code as a whole. I think it's still short enough to ilustrate the problem. Just start it with the datafile elips as an argument http://dl.dropbox.com/u/226980/elipsometry.tar.gz The timer shows how long each render cycle takes. The time seems to grow with number of cycles

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread John Hunter
On Sun, Jan 3, 2010 at 11:34 AM, Alexander Hupfer son...@gmail.com wrote: Hi, I have a scatter plot embedded in qt4 according to http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_qt4.html what works fine However if I try to add a colorbar to it by simply calling p =

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread Laurent Dufrechou
Hello, You are using the TK backend. Add this at the top of your script: import matplotlib matplotlib.use('QT4Agg') from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread Darren Dale
On Sun, Jan 3, 2010 at 5:26 PM, Alexander Hupfer son...@gmail.com wrote: Ok, that at least fixed the tkinter error, but I still don't get a colorbar attached to my plot. (which worked fine when I didn't embedd it in a Qt application) If you are importing from pylab or pyplot in your program,

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread Alexander Hupfer
Thanks I got it fixed. This leads to the follow up question: What is the right way to keep an application responsive while the graph is drawn? Drawing a scatter plot with 300 points seems to take a while. I guess I need to launch the drawing in another thread but don't know exactly how to do this

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread Eric Firing
Alexander Hupfer wrote: Thanks I got it fixed. This leads to the follow up question: What is the right way to keep an application responsive while the graph is drawn? Drawing a scatter plot with 300 points seems to take a while. I guess I That's strange--a scatter plot with 1000 points

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread John Hunter
On Sun, Jan 3, 2010 at 7:02 PM, Alexander Hupfer son...@gmail.com wrote: Thanks I got it fixed. This leads to the follow up question: What is the right way to keep an application responsive while the graph is drawn? Drawing a scatter plot with 300 points seems to take a while. I guess I need

Re: [Matplotlib-users] Colorbar with labels on top

2009-10-21 Thread Jae-Joon Lee
The api related to ticks and ticklabels is a bit confusing, at least for me. So, often, it seems best to directly change the tick properties. for t in axcbar.xaxis.get_major_ticks(): t.tick1On = True t.tick2On = True t.label1On = False t.label2On = True -JJ On Wed, Oct 21,

Re: [Matplotlib-users] colorbar tick label fontproperties

2009-09-22 Thread PHobson
John, The following code works for me (Python 2.5.4, Matplotlib 0.99): # create and format the colorbar cbar = pl.colorbar(G, ticks=range(g1,g2+1)) cbar.ax.set_ylabel('Gradient (%)', fontsize=10) cl = pl.getp(cbar.ax, 'ymajorticklabels') pl.setp(cl, fontsize=10) -Paul M. Hobson

Re: [Matplotlib-users] Colorbar not working with specgram

2009-07-22 Thread davide lasagna
Thanks Eric for pointing out this. However i've found that psd and specgram plot 10*log10*(Pxx/max(Pxx)), so i'll have a range from 0 db down. Anyway, what do you mean by should not be axes method? Do you mean using the array output of specgram and psd and plotting that result by myself? Cheers

Re: [Matplotlib-users] Colorbar not working with specgram

2009-07-22 Thread Eric Firing
davide lasagna wrote: Thanks Eric for pointing out this. However i've found that psd and specgram plot 10*log10*(Pxx/max(Pxx)), so i'll have a range from 0 db down. Aha, I wasn't looking closely enough! Anyway, what do you mean by should not be axes method? That was a side remark about what

Re: [Matplotlib-users] Colorbar Ticks

2009-05-25 Thread marcusantonius
I should perhaps mention, that if i try cbar=fig.colorbar(p1,orientation='horizontal',ticks=[0.0,2.0,4.0,6.0,8.0]) cbar.ax.set_xticklabels(['0', '2', '4','6','8']) the colorbar is drawn correctly, but I get the label 0 at position 2, the label 2 at position 4 and 4 at pos. 6, the labels at the

Re: [Matplotlib-users] Colorbar Ticks

2009-05-25 Thread Eric Firing
marcusantonius wrote: Hello, I have the problem, that sometimes the first and last ticklabel of a colorbar is not drawn. E.g. if I create a colorbar through fig.colorbar(p3,orientation='horizontal',ticks=np.arange(0.0,8,2)) I only get ticklabels at 2,4,6, but I would like it to have

Re: [Matplotlib-users] Colorbar Ticks

2009-05-25 Thread Eric Firing
marcusantonius wrote: I should perhaps mention, that if i try cbar=fig.colorbar(p1,orientation='horizontal',ticks=[0.0,2.0,4.0,6.0,8.0]) The ticks that it uses are taken from the list--they are the ones that are within the range of numbers mapped to colors. The list of ticks does not set

Re: [Matplotlib-users] Colorbar Ticks

2009-05-25 Thread marcusantonius
Thank you very much for your email. Your example imshow(rand(10,10)*8, vmin=0, vmax=8) colorbar(ticks=[0,2,4,6,8]) works fine. Note also that to get the sequence [0,2,4,6,8] you need arange(0,9,2), not arange(0,8,2). Or you can use linspace(0,8,5) if you prefer. Thank you for making me aware

Re: [Matplotlib-users] Colorbar for pcolor plot

2009-05-20 Thread John Hunter
On Wed, May 20, 2009 at 9:53 AM, Ryan May rma...@gmail.com wrote: Thanks for the full example, but if you carefully read the exception, it was telling you the problem. :) plot1 here is an axes object, which does not have a colorbar() method. Instead, you should change that to:

Re: [Matplotlib-users] Colorbar for pcolor plot

2009-05-20 Thread Ryan May
On Wed, May 20, 2009 at 10:04 AM, John Hunter jdh2...@gmail.com wrote: On Wed, May 20, 2009 at 9:53 AM, Ryan May rma...@gmail.com wrote: Thanks for the full example, but if you carefully read the exception, it was telling you the problem. :) plot1 here is an axes object, which does not

Re: [Matplotlib-users] colorbar with 2 different scales

2009-04-06 Thread Eric Firing
P.Romero wrote: Is it possible to create a colorbar with different scales on each side? Example: a temperature colorbar with celcius values on the left side and farenheit values on the right side. If so, how could this be done? A colorbar is just an axes object with some

Re: [Matplotlib-users] colorbar tick labeling

2008-11-20 Thread Eric Firing
Michael Outhouse wrote: I was wondering if it is possible to change the colorbar tick labeling in matplotlib from numeric to text. Essentially, I want the colorbar to be a qualitative indicator; in the jet scheme, I'd like blue to be labeled as 'unstable', green as 'neutral', and red as

Re: [Matplotlib-users] colorbar tick labeling

2008-11-20 Thread Scott Sinclair
2008/11/21 Eric Firing [EMAIL PROTECTED]: Michael Outhouse wrote: I was wondering if it is possible to change the colorbar tick labeling in matplotlib from numeric to text. Essentially, I want the colorbar to be a qualitative indicator; in the jet scheme, I'd like blue to be labeled as

Re: [Matplotlib-users] colorbar() fix limit on Heat map

2008-08-11 Thread Jeff Whitaker
stuartornum wrote: Hi All, You may remember from my previous post I was having problems plotting a heatmap, however Pete came through for me and made it work. Anyway, I have almost finished what I want to do. The only issue is fixing the colorbar() range limit. Sometimes the my values are

Re: [Matplotlib-users] colorbar() fix limit on Heat map

2008-08-11 Thread Jeff Whitaker
stuartornum wrote: Jeff, That worked perfectly ! Thank you. One more question... how would I change the colour scheme of the colorbar()? Thanks again Stuart: Use the cmap argument to specify a color map. Have you checked out the pylab examples? For me, they are the best way to learn

Re: [Matplotlib-users] ColorBar with axes

2008-07-31 Thread Eric Firing
[EMAIL PROTECTED] wrote: Hello, I would like to show a colorbar for my plot (see attachment) but I can't figure out how it works. In the examples on the website I only found the call to pylab.colorbar(), which doesn't work with my subplots. My code is as follows (with the bar graph-part

Re: [Matplotlib-users] colorbar()

2008-06-21 Thread Eric Firing
Bryan Fodness wrote: Is there a way to get the colorbar to work with an axes instance. ax2 = axes([0.2, 0.1, 0.6, 0.8], axisbg='w') ax2.fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r') ax2.pcolormesh(X, Y, newa, shading='flat', cmap=cm.YlOrRd)#gray_r) ax2.axvline(x=0, color='gray',

Re: [Matplotlib-users] colorbar

2008-06-20 Thread Yves Revaz
Ryan May wrote: Yves Revaz wrote: Hi all, When I use: colorbar(orientation='horizontal') the color bar is drawn on the bottom of the corresponding graph. Which option will draw the colorbar on the top of the graph ? I think (correct me if I'm wrong devs) you'll have to use the

Re: [Matplotlib-users] colorbar

2008-06-18 Thread Ryan May
Yves Revaz wrote: Hi all, When I use: colorbar(orientation='horizontal') the color bar is drawn on the bottom of the corresponding graph. Which option will draw the colorbar on the top of the graph ? I think (correct me if I'm wrong devs) you'll have to use the cax keyword argument to

Re: [Matplotlib-users] colorbar problem

2008-03-11 Thread humufr
Le Sunday 09 March 2008 14:32:05 Eric Firing, vous avez écrit : [EMAIL PROTECTED] wrote: Hello, I have some stupid questions about how to use colorbar. 1) I would like to be able to put the colorbar where I went: top, bottom, left, right. For what I see I

Re: [Matplotlib-users] colorbar problem

2008-03-09 Thread Eric Firing
[EMAIL PROTECTED] wrote: Hello, I have some stupid questions about how to use colorbar. 1) I would like to be able to put the colorbar where I went: top, bottom, left, right. For what I see I can do only a vertical left and horizontal bottom ones (with a

Re: [Matplotlib-users] Colorbar requires mappable?

2008-03-08 Thread Eric Firing
Ryan, See examples/colorbar_only.py. I think it illustrates what you want. Eric Ryan May wrote: Hi, In working on creating updating pcolor plots, I noticed that I can't create colorbars (which should be static) without first displaying an image. I have a fixed Normalize object and

Re: [Matplotlib-users] colorbar and set_under

2008-01-16 Thread Eric Firing
Carol Leger wrote: Hi folks, I have encountered a problem using colorbar and set_under with a color map that has only 32 colors. The downward arrow is not filled with the correct color. If 64 colors are used, the arrow is filled correctly. I actually want 8 colors. The test code is

Re: [Matplotlib-users] colorbar, setting limits

2007-03-27 Thread Evan Mason
Sorry, I realise that my example in my original post doesn't quite make sense. My data range is 17 to 23. I set clim to be clim([15, 25]). I then want the colorbar limits to be the same as clim, 15 to 25. The questions remains the same, which is how to set the range for colorbar. Thanks,

Re: [Matplotlib-users] colorbar, setting limits

2007-03-27 Thread Eric Firing
Evan, It is still not quite clear to me what you want versus what you are getting. With recent versions of mpl, the colorbar automatically uses the same color boundaries as contourf, if that is what the colorbar is tracking. What version of mpl are you using? (With the most recent mpl I see

Re: [Matplotlib-users] colorbar, setting limits

2007-03-27 Thread Evan Mason
Hi Eric I am using matplotlib-0.90.0. I am making 2 contourf subplots of temperature values which have similar but not equal ranges. In subplot1 the range is 15-25; in subplot2 it is 16 to 24. I use clim, giving it the max and min values obtained from a comparison of subplot1 and 2; i.e., I

Re: [Matplotlib-users] colorbar, ax.get_position after figsize changed by ax.set_aspect

2006-10-05 Thread Eric Firing
George Nurser wrote: I have been trying to i. plot a figure using pcolormesh ii. set the proportions of the figure using ax.set_aspect iii. draw colorbar Problem is, colorbar height uses whole of axes box, not just height of figure (whose proportions were set by call of