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

[Matplotlib-users] Colorbar on each subplot

2012-01-07 Thread davcra
Hi, I need to add a colorbar to each plot in a subplot but cant seem to get it to work. My code is as follows, # Plot time series of slowness, baz, abs.power and rel.power labels = 'rel.power abs.power baz slow'.split() fig = plt.figure() for i, lab in enumerate(labels): ax =

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

[Matplotlib-users] Colorbar labels never appear vertically

2011-08-19 Thread James McMurray
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 off and generally looks unprofessional. I am

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.

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

2011-06-13 Thread Nicholas Devenish
I've been seeing weird behaviour with using a colorbar() and adjusting the plot extents, either interactively in the GUI or through figure.subplots_adjust. If I adjust the axes after drawing the colorbar, it is placed incorrectly. This seems to happen independently of the backends that I have and

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

[Matplotlib-users] colorbar and scilimits

2011-03-21 Thread johanngoetz
Is there a way to set the style and scilimits to the colorbar axes? All my attempts failed. For example, run the following script, I get the error shown below: ### begin example script import numpy from matplotlib import pyplot n = 500 x = numpy.random.standard_normal(n) y = 2.0 + 3.0 * x +

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

[Matplotlib-users] colorbar: format labels with mathtext

2011-01-18 Thread Stefan Mauerberger
Hi Everyone, I would like to format the labels of a colorbar with mathtext. I have tried a lot with all the cax.formatter.___ options but unfortunately I was not able to get it working. I am plotting some Data with col = ax.pcolorfast( ... ) after this I create a colorbar with cax =

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

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

2011-01-13 Thread Daniel Mader
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 different results. How can I apply a global

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

[Matplotlib-users] colorbar() ticklabel color

2010-11-29 Thread Amit Finkler
Hi, I am trying to produce a pcolor figure with a black background using pylab.figure(facecolor = 'black') Consequently, I need to change the tick colors and xlabel and ylabel colors to white using pylab.xlabel('whatever is on the xlabel', color = 'white', fontsize = 14)

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

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

2010-11-18 Thread John
Folks, I was trying to use an object oriented approach to creating colorbars, but I could manage to make it work. Currently I have close to what I am trying to achieve, but the last bits are missing. The outstanding issues are: 1) I only need one colorbar, how would I create a single colorbar on

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

[Matplotlib-users] colorbar uncentered plots

2010-09-28 Thread Philip Vetter
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 clear/remove selected parts of the figure? I am using ipython for interactive figure drawing I find clf() will erase

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

[Matplotlib-users] colorbar questions ...

2010-09-10 Thread Oz Nahum
Hi Everyone, First I must cryout a little bit :-) Why colorbar is always so tricky ??? I'm trying to fine tune the colorbar of my contour plots. I would like to do the following things: 1) remove the box around it 2) hide the xticks 3) make the lines with the indicating colors with custom

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

[Matplotlib-users] Colorbar labeling

2010-08-20 Thread Bruce Ford
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? Bruce --- Bruce W. Ford Clear Science,

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

[Matplotlib-users] colorbar rescaling

2010-06-29 Thread Alexander Dietz
Hi, I hope someone can answer this colorbar related question. 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

[Matplotlib-users] colorbar rescaling

2010-06-28 Thread Alexander Dietz
Hi, I hope someone can answer this colorbar related question. 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

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

[Matplotlib-users] colorbar+log+latex

2010-04-16 Thread Yves Revaz
Dear list, I want to plot colored points using scatter, with the color of points corresponding to the log of the z value of the points. the corresponding scatter command is : scatter(x,y,c=z,norm=colors.LogNorm()) unfortunately, then I then draw a colorbar simply calling colorbar() the fonts

[Matplotlib-users] Colorbar shifting

2010-04-08 Thread Rachel-Mikel Arce Jaeger
Hello everyone, I'm working with hexbin() and I'd like the output to be shifted towards the red end of the spectrum. Does anyone know if there's a way to shift how the colors are output? Thanks! Rachel -- Download

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:

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

2010-03-04 Thread Jim Vickroy
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 the left side of the

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

[Matplotlib-users] colorbar with date-time formatting

2010-01-14 Thread George Nurser
Hi, I've got data in terms of day numbers, and wish to plot it as a 2D scatter plot, with the color denoting the day. I'd like the colorbar to be annotated in Apr 7 type format... I've tried the following code without success. import numpy as np import matplotlib.pyplot as plt from

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

[Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread Alexander Hupfer
Hi, I have a scatter plot embedded in qt4 according to http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_qt4.htmlwhat works fine However if I try to add a colorbar to it by simply calling p = scatter() colorbar(p) I get an error that says that something is outside the

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

[Matplotlib-users] Colorbar with labels on top

2009-10-21 Thread Thomas Robitaille
Hi, I'm trying to plot a horizontal colorbar with labels on top. I can use axcbar = fig.add_axes([0.2, 0.85, 0.6, 0.03]) axcbar.xaxis.set_ticks_position('top') cbar = fig.colorbar(s, cax=axcbar, orientation='horizontal') but then I lose the ticks on the bottom of the colorbar. However,

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,

[Matplotlib-users] colorbar tick label fontproperties

2009-09-22 Thread John [H2O]
Could someone please explain how to change the font properties for a colorbar tick label, the following causes no error, but it does NOT work: ## CREATE COLORBAR ## make a copy of the image object im2 = copy.copy(im) im2.set_cmap(colmap) ## create new axis for colorbar.

Re: [Matplotlib-users] colorbar tick label fontproperties

2009-09-22 Thread PHobson
-Original Message- From: John [H2O] [mailto:washa...@gmail.com] Sent: Tuesday, September 22, 2009 8:03 AM To: matplotlib-users@lists.sourceforge.net Subject: [Matplotlib-users] colorbar tick label fontproperties Could someone please explain how to change the font properties

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

[Matplotlib-users] Colorbar not working with specgram

2009-07-20 Thread davide lasagna
Hello everybody, this is my first post in this list. I'm plotting a spectrogram with Pxx, freqs, bins, im = specgram(y, nfft=256, f_sampling=12000) and i want to add a colorbar with colorbar() The problem is that the color scale seems to be wrong with respect to the data in Pxx, i.e. Pxx

[Matplotlib-users] Colorbar Ticks

2009-05-25 Thread marcusantonius
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 0,2,4,6,8 and I don't know how to

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

[Matplotlib-users] colorbar with 2 different scales

2009-04-06 Thread P.Romero
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? Please help, Thanks, P.Romero

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

[Matplotlib-users] colorbar tick labeling

2008-10-07 Thread Michael Outhouse
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 'stable'. I can change it so I

[Matplotlib-users] Colorbar values

2008-10-05 Thread Angus McMorland
Hi all, I'm trying to plot a colour bar for a scatter plot, and set the maximum value of the plot to something arbitrary. At the moment it always comes up as 255. How can I change this? ax = plt.gca() pts = ax.scatter(coords[:,0], coords[:,1], c=np.linspace(0,1,n_pts), s=16,

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

2008-08-11 Thread stuartornum
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 0.01 to 0.2 for

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

[Matplotlib-users] colorbar problem

2008-03-09 Thread humufr
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 simple use of the function). 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

[Matplotlib-users] Colorbar requires mappable?

2008-03-07 Thread Ryan May
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 colormap, so I would think that the colorbar wouldn't actually need any information from the image itself.

  1   2   >