Re: [Matplotlib-users] Include \hline on table inside figure

2015-01-23 Thread C M
On Fri, Jan 23, 2015 at 1:42 PM, Thomas Caswell wrote: > Have you looked at using the mpl tables? > http://matplotlib.org/examples/pylab_examples/table_demo.html > Just pointing out: the numbers in those tables and the words other than "Quake" are slightly cut-off at the top in the demo. --

Re: [Matplotlib-users] odd "singular matrix" error

2015-01-02 Thread C M
Still though, I thought we had enough logic checks to prevent this sort of >> error. I see you are using Python 2.5, which is older than what we >> currently support. Which version of matplotlib are you using? >> > > I'm using matplotlib 1.1.0. I could try upgrading. > Ben and others, OK, I tried

Re: [Matplotlib-users] odd "singular matrix" error

2014-12-31 Thread C M
of matplotlib are you using? > I'm using matplotlib 1.1.0. I could try upgrading. > > Cheers! > Ben Root > > > On Wed, Dec 31, 2014 at 2:03 AM, C M wrote: > >> I have no idea what this is. If I create a certain plot first in an >> application, it thro

[Matplotlib-users] odd "singular matrix" error

2014-12-30 Thread C M
I have no idea what this is. If I create a certain plot first in an application, it throws this error (edited to the key part): Traceback (most recent call last): File "thescript.py", line 2147, in AddPatchBar ax.add_patch(patch) File "C:\Python25\lib\site-packages\matplotlib\axes.py", li

Re: [Matplotlib-users] pick markers only but not the connecting line

2014-06-08 Thread C M
Great, thanks for all the help! On Sun, Jun 8, 2014 at 12:09 AM, Eric Firing wrote: > On 2014/06/07, 5:03 PM, C M wrote: > > > > > > > > On Sat, Jun 7, 2014 at 10:18 PM, Eric Firing > <mailto:efir...@hawaii.edu>> wrote: > > > > On 20

Re: [Matplotlib-users] pick markers only but not the connecting line

2014-06-07 Thread C M
On Sat, Jun 7, 2014 at 10:18 PM, Eric Firing wrote: > On 2014/06/07, 4:12 PM, C M wrote: > > I had been using a custom function (written originally by Jae-Joon and > > modified a little by me...quite a long time back now) that was working > > to allow point picking of marker

[Matplotlib-users] pick markers only but not the connecting line

2014-06-07 Thread C M
I had been using a custom function (written originally by Jae-Joon and modified a little by me...quite a long time back now) that was working to allow point picking of markers, but *not* the line connecting them. However, I've now discovered with the help of this list that the function I am using h

Re: [Matplotlib-users] event.ind in point picking gives wrong number

2014-06-07 Thread C M
On Sat, Jun 7, 2014 at 4:02 PM, Benjamin Root wrote: > Thanks for the example script. I think I have a clue now what is happening. > Thank you for the quick reply. > If one were to also print out the length of the "d" array, you will find > that it is significantly shorter than when you aren't

Re: [Matplotlib-users] event.ind in point picking gives wrong number

2014-06-07 Thread C M
ly puzzled why one set of data doesn't have this problem and another one does. Any suggestions for what's wrong greatly appreciated. Thanks, Che On Mon, Sep 16, 2013 at 9:15 AM, Benjamin Root wrote: > > > > On Sun, Sep 15, 2013 at 11:59 PM, C M wrote: > >> Just a

Re: [Matplotlib-users] colorbllind problem

2014-02-17 Thread C M
On Mon, Feb 17, 2014 at 1:15 PM, Gabriele Brambilla < gb.gabrielebrambi...@gmail.com> wrote: > Hi, > I'm dealing with a guy that is colorblind. > Have you got any suggestion on how could I show a plot like the one > attached to him? > Is there an option in pyplot that write little numbers near the

Re: [Matplotlib-users] event.ind in point picking gives wrong number

2013-09-15 Thread C M
On Sun, Sep 15, 2013 at 5:30 PM, C M wrote: > I have Matplotlib 1.1.0, and am doing point picking (using the OO approach > to Matplotlib, and embedded in wxPython). My relevant code is as follows: > > #connect the pick event to the pick event handler: > self.cid = self.canva

[Matplotlib-users] event.ind in point picking gives wrong number

2013-09-15 Thread C M
I have Matplotlib 1.1.0, and am doing point picking (using the OO approach to Matplotlib, and embedded in wxPython). My relevant code is as follows: #connect the pick event to the pick event handler: self.cid = self.canvas.mpl_connect('pick_event', self.on_pick) #This is the relevant part of the

Re: [Matplotlib-users] time axis format

2013-06-10 Thread C M
On Mon, Jun 10, 2013 at 8:08 PM, Sudheer Joseph wrote: > > Thank you, > So there is no way to get J F M A etc with out reducing font size? > I bet there a number of ways. Offhand I don't know the one that, once I hear about it, I will say, "D'oh, that's so easy" but I bet it exists. But you cou

Re: [Matplotlib-users] Trying to migrate to Python 3.2, Matplotlib 1.2.1

2013-04-18 Thread C M
On Thu, Apr 18, 2013 at 11:03 PM, John Ladasky wrote: > . > Reading more, I realize that the way I was getting GUI output previously > (with Python 2.7 and Matplotlib 1.1) was through wxPython. > Unfortunately, it appears that wxPython's star is fading, and a Python > 3-compatible version will not

Re: [Matplotlib-users] matplotlib is slow

2012-12-31 Thread C M
Resurrecting an old thread here On Tue, Mar 29, 2011 at 3:23 PM, David Kremer wrote: > > I would recommend running the import in the Python profiler to determine > > where most of the time is going. When I investigated this a few years > > back, it was mainly due to loading the GUI toolkits

[Matplotlib-users] wrapping y axis tick labels?

2012-07-20 Thread C M
How possible would it be to wrap y axis tick labels after a certain text length? I have a horizontal bar plot where some bars' labels are too long and therefore cut off. I can scrunch the width of the whole plot to accommodate them, but I'd much rather wrap long text and allow a little more space

Re: [Matplotlib-users] matplotlib for Mac OS 10.7 (Lion)

2012-04-24 Thread C M
> > Trying to help a Mac friend running OSX 10.7 (Lion) easily set up to test > > scripts I send him, and have some questions: > > > > 1) Can Matplotlib 1.1 run on the Python 2.7.2 version that comes with > > Lion? > > Yes. You can easily build it yoursef as long as you have XCode > installed: > >

[Matplotlib-users] matplotlib for Mac OS 10.7 (Lion)

2012-04-20 Thread C M
Trying to help a Mac friend running OSX 10.7 (Lion) easily set up to test scripts I send him, and have some questions: 1) Can Matplotlib 1.1 run on the Python 2.7.2 version that comes with Lion? 2) When is there expected to be an installer for Matplotlib 1.1 for OSX 10.7? Thanks, Che ---

[Matplotlib-users] why does transform=None cause a patch not to be shown?

2012-03-21 Thread C M
For the following code, if I remove the transform=None a green patch is shown. If it is in, it is not shown. I would think that transform=None should have no effect. Why is this? Thanks, Che import matplotlib.pyplot as plt import matplotlib.patches as patches from matplotlib.path import Path

[Matplotlib-users] make a rectangle that doesn't change with zoom.

2012-03-20 Thread C M
I'm trying to make a rectangle that "highlights" a straight line of markers such that: 1) it surrounds/contains the points, basically like: -- | | | OO O

Re: [Matplotlib-users] custom markers from images?

2012-03-07 Thread C M
I've for now taken a different approach that means I won't need custom markers from images. But I'm just curious: is there any wish/plans in Matplotlib to add support for this? I think it could do a lot to expand what's possible in terms of the look and feel of plots (even without things drifing

Re: [Matplotlib-users] custom markers from images?

2012-03-02 Thread C M
> Right. It should be technically feasible to just simply tell figimage to > use a different transformation object, but this might have implications > elsewhere. I am very hazy in this part of mpl. > Hmm, I've simplified the figimage to just this line: fig.figimage(im,100,100,origin="up

Re: [Matplotlib-users] custom markers from images?

2012-03-01 Thread C M
> Yeah, there are better ways to do that, somewhat. The problem with the > proposed solution is that it relies on non-public APIs, which are can be > subject to change without deprecation. Instead, I would have created the > figimage object with a particular transform object that would have place

[Matplotlib-users] custom markers from images?

2012-02-29 Thread C M
I'd like to use, in one case, small loaded images (pngs) as markers on an interactive matplotlib plot (using the OO approach). I'd potentially like to be able to point-pick these markers, too, as well as have them update appropriately if the plot is resized. The only example I've been to find of

Re: [Matplotlib-users] 2 possible bugs with make_axes_area_auto_adjustable

2012-02-15 Thread C M
On Mon, Feb 13, 2012 at 12:48 PM, C M wrote: > I noticed what is causing one of these issues: > > 1) When I point-pick on the plot, the plot area still "jumps" (expands >> vertically a small amount). It used to do this each time I point-picked, >> but after upgrad

Re: [Matplotlib-users] 2 possible bugs with make_axes_area_auto_adjustable

2012-02-13 Thread C M
I noticed what is causing one of these issues: 1) When I point-pick on the plot, the plot area still "jumps" (expands > vertically a small amount). It used to do this each time I point-picked, > but after upgrading MPL it now just does it the *first* time only. But is > it possible it can be fix

[Matplotlib-users] 2 possible bugs with make_axes_area_auto_adjustable

2012-02-09 Thread C M
Jae-Joon's code, make_axes_area_auto_adjustable has been a great help to dynamically resizing my plots' axes area--such an improvement. But there are two bugs I've noticed that I wonder if has been identified/fixed yet: 1) When I point-pick on the plot, the plot area still "jumps" (expands vertic

Re: [Matplotlib-users] How matplotlib got me a job

2012-02-06 Thread C M
On Mon, Feb 6, 2012 at 2:59 PM, Benjamin Root wrote: > Alternate title: "How I finally convinced my Dad that open-source can put > food on the table". Since this entire story got started on this mailing > list, I figured it would be appropriate to end it here. > Inspiring and uplifting story, Be

Re: [Matplotlib-users] Change xaxis labels

2012-02-06 Thread C M
On Mon, Feb 6, 2012 at 9:23 AM, David Craig wrote: > Hi, I have a plot and the xaxis shows number of seconds after a start > point. I would like to convert them to days anyone know how to do this. > I have looked at the documentation but cant find what I need. > Couldn't you divide your data poi

Re: [Matplotlib-users] Show custom tool on NavToolbar staying pressed in

2012-02-01 Thread C M
On Wed, Feb 1, 2012 at 5:25 PM, C M wrote: > The standard navigation toolbar has tools that press in and stay pressed > to put the interation into a "mode", like zoom mode or pan mode. You press > the zoom tool, it stays shown as pressed in while it's in that mode. &g

[Matplotlib-users] Show custom tool on NavToolbar staying pressed in

2012-02-01 Thread C M
The standard navigation toolbar has tools that press in and stay pressed to put the interation into a "mode", like zoom mode or pan mode. You press the zoom tool, it stays shown as pressed in while it's in that mode. I am trying to add a new custom tool to the toolbar, and want it to put things i

Re: [Matplotlib-users] no leading 0 on times from DateFormatter

2012-01-30 Thread C M
On Mon, Jan 30, 2012 at 12:32 PM, Daryl Herzmann wrote: > On Sun, Jan 29, 2012 at 10:10 PM, C M wrote: > > If I use the DateFormatter, like this: > > > > mydateformatter = > > > > > I'll get dates like (note the time part): > > > > Nov 27 201

[Matplotlib-users] no leading 0 on times from DateFormatter

2012-01-29 Thread C M
If I use the DateFormatter, like this: mydateformatter = DateFormatter("%b%d \n %I:%M%p", self._tz) I'll get dates like (note the time part): Nov 27 2011 03:00 PM Instead, I'd like to lose the zero on times, like: Nov 27 2011 3:00 PM Is there a way to do that? Thanks, Che

Re: [Matplotlib-users] Subplot x-tick labels overlap with each other and with titles

2012-01-29 Thread C M
On Wed, Jan 4, 2012 at 2:19 PM, Benjamin Root wrote: > > > On Wednesday, January 4, 2012, jeffsp wrote: > > > > plt.tight_layout(), sweet > > > > it still makes the labels too close to read, even if they don't overlap. > > that is, they're just a continuous string of numbers with no whitespace >

[Matplotlib-users] help with custom formatter rules

2011-11-28 Thread C M
As related to another question(s) I've posted, can someone help with this custom formatter? This is for use in a FunctionFormatter to be used on the y axis to format the ticks (in particular, to remove them when not wanted). Example: def CustomFormatter(self,y,i): if y < 0: r

Re: [Matplotlib-users] data free margin

2011-11-24 Thread C M
> > I don't know if this will work for you, but in your situation I would > probably just make another axis for the data with no y value. Like, a short > squat axis directly below the main axis. > > -Jeff > Thanks. That crossed my mind, but I never tried it yet. I thought it would take up too m

Re: [Matplotlib-users] data free margin

2011-11-23 Thread C M
On Tue, Nov 22, 2011 at 3:09 PM, Nicolas Rougier wrote: > > Is that what you want ? > > No ticks, no labels: > > import matplotlib.pyplot as plt > plt.plot(np.arange(10), np.arange(10)) > plt.ylim(0,10) > plt.yticks(np.linspace(3,10,8)) > plt.show() > Thanks. That works in your example, but in m

[Matplotlib-users] data free margin

2011-11-22 Thread C M
What's the best way in Matplotlib to have a y axis that doesn't have ticks/axis numbers near the bottom of the graph? I don't know if it would be specified as the bottom 1/10th of the graph or x amount of pixels or inches or whatever...just need a bit of extra "y-less" space there to plot values t

Re: [Matplotlib-users] question about tight_layout()

2011-10-16 Thread C M
> So, it seems that the issue is platform-dependent. OK. > As for the error message, it seems that the subplot_params values > (left, right, top, bottom, etc) calculated by the "tight_layout" > routine is somehow corrupted. > Why this happens is hard to track down unless I can reproduce the error

Re: [Matplotlib-users] question about tight_layout()

2011-10-16 Thread C M
> In your example code, do you see the error raised only when you > include the tight_layout call? Yes. To see this (at least on my platform), you take the example code and try two things: 1) Comment IN this line: self.panel.Layout(). Run it and you'll get the error. 3) Now comment OUT the tigh

Re: [Matplotlib-users] question about tight_layout()

2011-10-15 Thread C M
On Sat, Oct 15, 2011 at 10:15 AM, Jae-Joon Lee wrote: > Figure.tight_layout() is a correct way. > Do you see that error only when you use Figure.tight_plot (and not > when you use plt.tight_layout)? > Yes. > What happen you try the script below. > > import matplotlib.pyplot as plt > fig = plt.

[Matplotlib-users] question about tight_layout()

2011-10-14 Thread C M
Just trying out the latest mpl 1.1.0 and the tight_layout() method. I saw the guide written about it, but am a unsure how to use this when using the OO approach to using Matplotlib. When using pyplot, the method is: plt.tight_layout(). When using the OO form of mpl, is it: figure.tight_layout(

Re: [Matplotlib-users] How do you Plot data generated by a python script?

2011-09-06 Thread C M
>> The problem is that I have a data set >> with ~1250 so I cant' do the sorting or finding the mean by hand. That's not a problem--that's programming! Even if you had a data set with five items you should be in the mind set that "by hand" is an 18th century approach. This will drive further pro

Re: [Matplotlib-users] How do you Plot data generated by a python script?

2011-09-03 Thread C M
On Sat, Sep 3, 2011 at 7:32 PM, mdekauwe wrote: > > So you do want a histogram then? I assume you have all of this sorted then, > the histogram function is very good. I don't think he's describing a histogram, because he is not plotting frequency of observations on the y axis, but data values (me

Re: [Matplotlib-users] How do you Plot data generated by a python script?

2011-08-25 Thread C M
On Thu, Aug 25, 2011 at 10:01 PM, surfcast23 wrote: > > Hi, > >   there is only one column. so I want a plot of y and x. With y taking > values running from 0 to n  or 7 in my example and x as the average of the > values that are contained in the rows in my example it was 5.57. It seems to me tha

[Matplotlib-users] center figure.suptitle with axes.set_title

2011-08-05 Thread C M
For a figure with just one subplot, I want to have a larger main title (using figure.suptitle) and a smaller subtitle (using axes.set_title). However, using horizontalalignment = 'center' on both the suptitle and title doesn't center the two relative to each other, because my subplot varies in wid

Re: [Matplotlib-users] simple question about locator every 0.5

2011-07-20 Thread C M
> Try MultipleLocator: > > from matplotlib.ticker import MultipleLocator > halflocator = MultipleLocator(base=0.5) > ax.xaxis.set_major_locator(halflocator) > > etc. Thanks, that works for me. I didn't think I could use non-integers (0.5) because the docs said, "Set a tick on every integer that i

[Matplotlib-users] help with code for DurationFormatter

2011-07-20 Thread C M
A runnable code sample is attached. I'm trying to plot durations in time (sec to hours) on the y axis such that if you zoom, it changes the units and axis label appropriately. When run, it looks right. But, when I zoom on the first point, it is shown on the y axis at '0.20' minutes. I would lik

Re: [Matplotlib-users] simple question about locator every 0.5

2011-07-20 Thread C M
On Wed, Jul 20, 2011 at 7:56 PM, Gökhan Sever wrote: > > > On Wed, Jul 20, 2011 at 5:41 PM, C M wrote: >> >> On Wed, Jul 20, 2011 at 7:24 PM, Buchholz, Greg >> wrote: >> >>-----Original Message- >> >>From: C M [mailto:cmpyt...@gmail.com] &

Re: [Matplotlib-users] simple question about locator every 0.5

2011-07-20 Thread C M
On Wed, Jul 20, 2011 at 7:24 PM, Buchholz, Greg wrote: >>-Original Message- >>From: C M [mailto:cmpyt...@gmail.com] >> >>Sorry, this is super-simple, but I'm lost in the whole >>locator/formatter part of the docs. >> >>How can I make a locat

[Matplotlib-users] simple question about locator every 0.5

2011-07-20 Thread C M
Sorry, this is super-simple, but I'm lost in the whole locator/formatter part of the docs. How can I make a locator that just places a tick at every multiple of 0.5 around the data? So the y axis would look like: 3.5 -- 3.0 -- 2.5 -- 2.0 -- 1.5 -- 1.0 -- etc. Thanks, Che -

Re: [Matplotlib-users] plot duration given format of '3:04:02.994000'

2011-07-18 Thread C M
On Mon, Jul 18, 2011 at 10:58 AM, Daniel Mader wrote: > Hi, > > why don't you just parse the returned string? > > asdf = '3:04:02.994000' > asdf = asdf.split(':') > temp = asdf[-1].split('.') > print asdf > asdf.pop(-1) > print asdf > asdf.extend(temp) > print asdf > asdf = [int(i) for i in asdf]

[Matplotlib-users] plot duration given format of '3:04:02.994000'

2011-07-16 Thread C M
This a time duration in my database: '3:04:02.994000' (i.e., 3 hrs, 4 min, 2 sec and 994 microsec). It's a string. Is there a way to allow Matplotlib to interpret that directly as a duration of time? Thank you. -- AppS

Re: [Matplotlib-users] formatter for durations of varying units

2011-07-12 Thread C M
On Tue, Jul 12, 2011 at 3:15 AM, Maximilian Trescher wrote: > Hi, > >> I want to pick a good (dynamic, for zooming) way to format the y axis. >> There are two issues: >> Does (1) seem like the right approach?  And for 2, is there already a >> formatter that is appropriate for this or could be adap

[Matplotlib-users] formatter for durations of varying units

2011-07-11 Thread C M
I need to make a dates (on x) vs. durations of time (on y) plots and need to have smart formatting for the y axis. My y data is in the database in the format: '0:00:02.994000', (that is, 2.9 seconds) and I'd like the y axis to be expressed in ticks of, e.g., "2 hrs", or "10 minutes", or "25 seconds

Re: [Matplotlib-users] mpl newbie question...

2011-05-30 Thread C M
I do not know the first thing about Python language.But things are not > going well That's not a "but" but an "of course". How could they possibly go well already? It takes time to learn something. You will get there, bit by bit. > and I do not want to use any other > programs such as GNU

Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-13 Thread C M
On Wed, May 11, 2011 at 12:29 AM, Jae-Joon Lee wrote: > I think I fixed a similar bug at some point but I'm not sure if that > is related with this. > Are you using the *make_axes_area_auto_adjustable* from the current > git master (check > examples/axes_grid/make_room_for_ylabel_using_axesgrid.py

Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-13 Thread C M
On Fri, May 13, 2011 at 6:23 AM, Pauli Virtanen wrote: > Thu, 12 May 2011 15:16:43 -0400, C M wrote: > [clip: installing Python modules] >> Is there a step-by-step method on the >> website that shows how to do this? > > Here: http://docs.python.org/install/index.html Tha

Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-12 Thread C M
On Thu, May 12, 2011 at 2:50 PM, Michael Droettboom wrote: > On 05/12/2011 02:34 PM, C M wrote: >> >> On Thu, May 12, 2011 at 1:26 PM, Michael Droettboom >>  wrote: >> >>> >>> You can always get a tarball of the current git master by going here: >

Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-12 Thread C M
On Thu, May 12, 2011 at 1:26 PM, Michael Droettboom wrote: > You can always get a tarball of the current git master by going here: > > https://github.com/matplotlib/matplotlib > > clicking on "Download" and choosing one of the "download source" options > at the top of the popup box. > > Mike Than

Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-11 Thread C M
On Wed, May 11, 2011 at 11:07 AM, C M wrote: > On Wed, May 11, 2011 at 12:29 AM, Jae-Joon Lee wrote: >> I think I fixed a similar bug at some point but I'm not sure if that >> is related with this. >> Are you using the *make_axes_area_auto_adjustable* from the cu

Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-09 Thread C M
On Thu, Sep 30, 2010 at 7:55 AM, Jae-Joon Lee wrote: > On Thu, Sep 23, 2010 at 10:31 AM, C M wrote: >> Until a more permanent solution is figured out, can anyone recommend >> any workarounds, even if they are a little clunky?  I'm embedding mpl >> plots in wxPython and

Re: [Matplotlib-users] UserWarning: Attempting to set identical bottom==top

2011-05-06 Thread C M
On Fri, May 6, 2011 at 10:33 AM, Benjamin Root wrote: > On Thu, May 5, 2011 at 10:01 PM, C M wrote: >> >> > Because you have a py2exe'ed program, I suspect that whoever packaged >> > the >> > program should be the one to modify that program to choose i

Re: [Matplotlib-users] UserWarning: Attempting to set identical bottom==top

2011-05-05 Thread C M
> Because you have a py2exe'ed program, I suspect that whoever packaged the > program should be the one to modify that program to choose its axes limits > more robustly in order to avoid the warning message. Maybe I have been unclear. I am the sole developer of this application, and I occasionall

Re: [Matplotlib-users] UserWarning: Attempting to set identical bottom==top

2011-05-05 Thread C M
On Thu, May 5, 2011 at 10:03 PM, C M wrote: > On Thu, May 5, 2011 at 7:58 PM, Benjamin Root wrote: >> >> >> On Sun, May 1, 2011 at 4:35 PM, C M wrote: >>> >>> I get this error and would like to know what to do to eliminate it and >>> also what

[Matplotlib-users] UserWarning: Attempting to set identical bottom==top

2011-05-01 Thread C M
I get this error and would like to know what to do to eliminate it and also what it means: C:\Python25\lib\site-packages\matplotlib\axes.py:2571: UserWarning: Attempting to set identical bottom==top results in singular transformations; automatically expanding. bottom=0, top=0 + 'bottom=%s, top=%s'

Re: [Matplotlib-users] get bboxes of bars in data coordinates

2011-03-28 Thread C M
On Mon, Mar 28, 2011 at 1:44 PM, C M wrote: > I need to get the bboxes for time-range bars (matplotlib.patches.Rectangle > objects) on a bar plot for a custom autoscaling function. > > Right now, I get them like this, where rectObj = a bar and bboxes = a list > of bboxes: &g

Re: [Matplotlib-users] get bboxes of bars in data coordinates

2011-03-28 Thread C M
I should add, I can see that (I think) this needs to use a transform to get it in data coordinates, because if I do this to each rectObj (each bar): trans = rectObj.get_patch_transform() print 'trans is: ', trans I get: trans is: BboxTransformTo(Bbox(array([[ 734189.52541214, 730844.],

[Matplotlib-users] get bboxes of bars in data coordinates

2011-03-28 Thread C M
I need to get the bboxes for time-range bars (matplotlib.patches.Rectangle objects) on a bar plot for a custom autoscaling function. Right now, I get them like this, where rectObj = a bar and bboxes = a list of bboxes: bboxes.append(rectObj.get_path().get_extents()) print 'bboxes is: ', bboxes H

[Matplotlib-users] exclude lines from a loose_autoscale_view function

2011-03-23 Thread C M
I'm not sure if this is going to work to solve an issue I'm having, but I'd like to try it before asking a much more complex question. I have a function, loose_autoscale_view(), that is based on the autoscale_view function in mpl but allows margin arguments to push the margins out a bit more. I'd

Re: [Matplotlib-users] onpick on a 2 y plot ( via twinx() ) seems to only allow picking of second axes's artists

2011-02-11 Thread C M
On Thu, Jan 20, 2011 at 4:44 AM, Stephan Markus wrote: > > Hello! > > I am also using two axes in a plot and want to be able to pick the lines of > both axes. > So far I used MPL 0.99.3 and a button on my interface to change the z-order > of the axes in order to be able to pick lines of the "activ

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-27 Thread C M
> just make a numpy array out of your two lists, and you'll be able > to subtract one from the other. > > import numpy as np > top = np.array(top) > bot = np.array(bot) Thank you, Paul. That worked and I'm now able to display bar charts. I appreciate it. Best, Che --

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-27 Thread C M
Hi Paul, > The reason you were getting that error is because unless you > specify otherwise, ax.bar will make the bottom of the bars at 0 - > which isn't an allowed date, hence the error. Change your bar > line to this (I also added align='center', but you can remove it > if you want): Aha, OK th

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-26 Thread C M
> 3) I am getting just hammered with the following error *a lot* in date > plotting lately: > > ValueError: ordinal must be >= 1 OK, I made up a small runnable sample to show this with bar(). (Using code that someone else wrote[1]). This code runs when using plot_date(), but if you comment that

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-26 Thread C M
On Wed, Jan 26, 2011 at 9:16 PM, Jae-Joon Lee wrote: > On Thu, Jan 27, 2011 at 10:07 AM, C M wrote: >> I know the 2nd problem is that a dictionary cannot have a mutable >> object like a list as a key.  But previously, as I said, I was able to >> call line, (with the comma) a

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-26 Thread C M
> Just a thought, are you trying out the new legend code? I don't know if I am or not. But these problems are prior to any code regarding the legend. > Could you do a print of the type for bars? When I write it as just bars without the comma it is: bars type = If I write it with the comma (

[Matplotlib-users] too many values to unpack with a bar chart

2011-01-26 Thread C M
I usually do this for line graphs with markers: line, = self.subplot.plot_date(dates,data) along with some keywords to tweak the plot. I then add line to a dictionary to keep track of it: self.line_to_data_dict[line] = self.activity But today I tried this with a bar chart, just changin

Re: [Matplotlib-users] floating bar chart?

2011-01-24 Thread C M
On Mon, Jan 24, 2011 at 4:42 PM, Paul Ivanov wrote: > C M, on 2011-01-24 16:27,  wrote: >> I looked through the gallery, but didn't see this one and am not sure >> how to create it.  It would be a "floating bar chart" (or floating >> column chart)

[Matplotlib-users] floating bar chart?

2011-01-24 Thread C M
I looked through the gallery, but didn't see this one and am not sure how to create it. It would be a "floating bar chart" (or floating column chart), like what is seen here: http://peltiertech.com/Excel/pix1/BloodSugarFloater.gif Thanks, Che

Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-12-14 Thread C M
On Thu, Sep 30, 2010 at 7:55 AM, Jae-Joon Lee wrote: > On Thu, Sep 23, 2010 at 10:31 AM, C M wrote: > > Until a more permanent solution is figured out, can anyone recommend > > any workarounds, even if they are a little clunky? I'm embedding mpl > > plots in wxPytho

Re: [Matplotlib-users] unable to point pick 2nd axis after upgrade to mpl 1.0

2010-12-14 Thread C M
> It will work if you explicitly set its transform. > >star, = ax.plot([xdata[ind]], [ydata[ind]], '*', > ms=40, mfc='y', mec='b', > transform=thisline.get_transform()) > > JJ, thank you, this worked in my app as well. > > I also use the identity of the picked line in my

Re: [Matplotlib-users] unable to point pick 2nd axis after upgrade to mpl 1.0

2010-12-09 Thread C M
On Thu, Dec 9, 2010 at 8:45 PM, Jae-Joon Lee wrote: > As far as I understand, all the events in matplotlib are associated > with a single Axes instance (or None). For overlapping multiple axes, > the axes with highest zorder is picked up. And a "pick > event only works for artists in the associa

Re: [Matplotlib-users] unable to point pick 2nd axis after upgrade to mpl 1.0

2010-12-09 Thread C M
> I have created a runnable sample app that demonstrates the problem Here is a much simpler 10 line sample that doesn't require wxPython and demonstrates the problem: you can't pick the red line. This seems like a bug in mpl 1.0. import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add

[Matplotlib-users] unable to point pick 2nd axis after upgrade to mpl 1.0

2010-12-07 Thread C M
Hello, list. I have created a runnable sample app that demonstrates the problem (mentioned also in another thread) in the subject line. The sample is: - mpl 1.0 embedded in wxPython using wxAgg backend. - using plot() for simplicity, but see same issue if it is plot_date(). (I do date plotting)

Re: [Matplotlib-users] what is line._invalid in matplotlib 1.0?

2010-12-05 Thread C M
On Sun, Dec 5, 2010 at 9:33 PM, Jae-Joon Lee wrote: > Here is a modified version of the code. Note that since it uses > non-public APIs, it may stop to work again in the future. According to > your original post, you seem to want to pick up points only. I guess > the better way is to have a separ

[Matplotlib-users] what is line._invalid in matplotlib 1.0?

2010-12-05 Thread C M
Hello. I upgraded from about mpl 0.98.5 to 1.0, and this code, which worked in 0.98.5: if line._invalid: line.recache() now gives this error: AttributeError: 'Line2D' object has no attribute '_invalid' What is now (1.0) the right way to test whether a Line2D object is invalid? T

Re: [Matplotlib-users] upgrade to 1.0 help

2010-12-03 Thread C M
On Fri, Dec 3, 2010 at 8:10 PM, C M wrote: > > > Hello. I've decided to upgrade to matplotlib 1.0, but I'll need to fix a >> few problems that have come up. I was hoping I could get some help on this >> here. >> > > Second problem: the grid bac

Re: [Matplotlib-users] upgrade to 1.0 help

2010-12-03 Thread C M
Hello. I've decided to upgrade to matplotlib 1.0, but I'll need to fix a > few problems that have come up. I was hoping I could get some help on this > here. > Second problem: the grid background is gone despite these lines are not throwing any errors (here, self.subplot is an axis): self.

[Matplotlib-users] upgrade to 1.0 help

2010-12-03 Thread C M
Hello. I've decided to upgrade to matplotlib 1.0, but I'll need to fix a few problems that have come up. I was hoping I could get some help on this here. First thing is, I have a bit of point picker code that was written by JJ on this list some time back that has been working well. This is the

Re: [Matplotlib-users] subclassing AutoDateFormatter correctly

2010-12-01 Thread C M
On Wed, Dec 1, 2010 at 12:28 AM, Ryan May wrote: > On Tue, Nov 30, 2010 at 7:00 PM, C M wrote: > > Thanks, Ryan. I've done that now. I use the OOP approach to matplotlib > and > > embed it in wxPython, so my example uses that. I did not know how to > apply > >

Re: [Matplotlib-users] subclassing AutoDateFormatter correctly

2010-11-30 Thread C M
On Tue, Nov 30, 2010 at 12:23 PM, Ryan May wrote: > On Tue, Nov 30, 2010 at 10:44 AM, C M wrote: > > > > > > On Sun, Nov 28, 2010 at 8:52 PM, C M wrote: > >> > >> How can I correctly subclass AutoDateFormatter and use it in my code? > >&g

Re: [Matplotlib-users] subclassing AutoDateFormatter correctly

2010-11-30 Thread C M
On Sun, Nov 28, 2010 at 8:52 PM, C M wrote: > How can I correctly subclass AutoDateFormatter and use it in my code? > > What I am doing is copying the code from matplotlib's AutoDateFormatter and > changing the strings for how the dates are represented and maki

[Matplotlib-users] subclassing AutoDateFormatter correctly

2010-11-28 Thread C M
How can I correctly subclass AutoDateFormatter and use it in my code? What I am doing is copying the code from matplotlib's AutoDateFormatter and changing the strings for how the dates are represented and making that a class, MyAutoDateFormatter. AutoDateFormatter expects a locator, and I think (

Re: [Matplotlib-users] date plot with two y axes...and some other things

2010-11-26 Thread C M
On Thu, Nov 18, 2010 at 12:59 PM, C M wrote: > Goals:  date plot with two y axes (plotting completely different things) >            point picking and point labeling >            As many lines as user wants, all colored differently. > > Having some problems with this.  (matplotli

[Matplotlib-users] lines not shown within transparent marker?

2010-11-26 Thread C M
This is not important at all and unlikely to be supported, but just out of curiosity: Is it possible to set matplotlib such that, when using the 'o-' marker style (marker connected by lines) and partially transparent markers, the lines are not shown within the transparent marker? That is, the li

[Matplotlib-users] date plot with two y axes...and some other things

2010-11-18 Thread C M
Goals: date plot with two y axes (plotting completely different things) point picking and point labeling As many lines as user wants, all colored differently. Having some problems with this. (matplotlib 0.98.5) 1) There is a known bug with twinx() and plot_date: http://

[Matplotlib-users] simpler example of embedding in wx

2010-09-25 Thread C M
I'd like to offer a simplest possible example for embedding in wxPython; significantly simpler and completely pared down compared to either of the two that are shown here: http://www.scipy.org/Matplotlib_figure_in_a_wx_panel but I don't have access to modify the page. Doesn't anyone on the list

Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-09-22 Thread C M
On Wed, Sep 22, 2010 at 6:16 PM, Eric Firing wrote: > On 09/22/2010 10:11 AM, Russell Owen wrote: >> On Sep 22, 2010, at 11:16 AM, Benjamin Root wrote: >> >>> On Wed, Sep 22, 2010 at 12:04 PM, Russell E. Owen >> > wrote: >>> >>>     In article <4c935c08.1000...@gmail.com >>>  

Re: [Matplotlib-users] py2exe and matplotlib - Fonts: do I need them all?

2010-09-16 Thread C M
On Thu, Sep 16, 2010 at 6:33 PM, Carlos Grohmann wrote: > Hello all, > > I'm new to py2exe but I managed to create a binary executable of my > program. Now I'm experiencing on how to make the final size of the > binary smaller. > > I already managed to cut about 15Mb by removing calls to pyQt (I u

Re: [Matplotlib-users] progress bar?

2010-06-28 Thread C M
On Mon, Jun 28, 2010 at 11:31 AM, Jim Vickroy wrote: > Carlos Grohmann wrote: > > I've been searching but coudn't find any example on how to add a > progress bar to a wxpython+matplotlib app. > I'd like my app to show a progress bar while some gridding and > contouring are being done. Or, if you

  1   2   >