[Matplotlib-users] adding custom legends to multicolored line

2011-08-16 Thread Ravi Kanth Vanapalli
Hi , I wish to add a custom legend to a multicolored line drawn using matplotlib as shown in the figure below http://www.scipy.org/Cookbook/Matplotlib/MulticoloredLine I tried exploring the legend but somehow couldn't figure out its usage and how to adapt it to multicolored line as in the above

[Matplotlib-users] trouble redrawing the canvas when embedding the matplotlib figure in wxpython , also tooltip not being enabled when matplotlib figure placed in wxpython

2011-07-13 Thread Ravi Kanth Vanapalli
\\version_13_13th July\gtool.xrc' print 'loading', xrcfile self.res = xrc.XmlResource(xrcfile) # main frame and panel - self.frame = self.res.LoadFrame(None,mainFrame) print 'RAVI: Frame is :',self.frame self.panel = xrc.XRCCTRL(self.frame

Re: [Matplotlib-users] trouble redrawing the canvas when embedding the matplotlib figure in wxpython , also tooltip not being enabled when matplotlib figure placed in wxpython

2011-07-13 Thread Ravi Kanth Vanapalli
and panel - self.frame = self.res.LoadFrame(None,mainFrame) print 'RAVI: Frame is :',self.frame self.panel = xrc.XRCCTRL(self.frame,mainPanel) # matplotlib panel - # container for matplotlib panel (I like to make a container

[Matplotlib-users] creating a multi colored graph with respect to the values in y-axis

2011-06-17 Thread Ravi Kanth Vanapalli
Hi all, I am a beginner in python and matplotlib. I need to implement a graph with multiple colors in it. In a way, I have a function which varies with respect to time and amplitude. I have time on x-axis and amplitude on y-axis. Lets say the amplitude of the graph is divided into 4 ranges, say

[Matplotlib-users] boundaryNorm functionality for mapping based on values range and also occurance of external factors like flag

2011-06-17 Thread Ravi Kanth Vanapalli
Hi all, Just wanted to know how to go about when I have to do my color mapping not only with respect to range of values on y-axis but also based on some other conditions as well. i.e, say ( rangeon y-axis condtion1 condition2 ) where condition1 could be occurance of some event say, a flag1 is

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

[Matplotlib-users] Incompatibility with axvspan and legend on a semilog plot

2010-04-28 Thread Shrividya Ravi
Hi all, I am having a problem having both a vspan and a legend in a figure plotted on a semilog axis. A simple code that gives the following error is shown in red: ERROR return self.frozen().__array__() File /usr/lib/pymodules/python2.6/matplotlib/transforms.py, line 1051, in __array__

Re: [Matplotlib-users] contourf doesn't like a rectangular grid

2010-03-08 Thread Shrividya Ravi
Hi there, I think I made a mistake with putting in a tuple in my first email, but here is the error output from the contourf that I call within a script. I use this script before with a square grid and there is no problem. Anyway, after your email, I played with the script again and I think I have

[Matplotlib-users] contourf doesn't like a rectangular grid

2010-03-07 Thread Shrividya Ravi
Hi all, I have been using contourf quite happily with a square number of grid points. e.g. a 20 by 20 grid. I recently decided to do a contourf plot of a 20 by 15 grid (300 points) and I get errors. Unfortunately, I am plotting experimental data so I cannot really tailor the grid size. Here is

Re: [Matplotlib-users] Noob confusion: Pcolor

2009-11-11 Thread Shrividya Ravi
Thanks for your reply, Giorgio. I had a look at the documentation for pcolor but unfortunately, I can't pick out where I have gone wrong. I have attached my data array as a txt file. In ipython, I use the 'loadtxt' command to load the dataset and then assigned the variables x,y, and z to the

Re: [Matplotlib-users] showing current value on boxplot

2009-08-25 Thread Ravi A.
Worked like a charm. Thank you very much! I really appreciate the sample code and teaching by example. Jouni K. Seppänen wrote: Ravi A. ravi.ara...@gmail.com writes: I am using boxplot and i wanted to mark current value or any special value on the box plot. How do i achieve

[Matplotlib-users] showing current value on boxplot

2009-08-24 Thread Ravi A.
Hi, I am new to matplotlib. I am using boxplot and i wanted to mark current value or any special value on the box plot. How do i achieve this? Something like below. Thanks in advance, --- [---X--]- --[-]---X--- -- View this message in context: