[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] 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

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

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] 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

[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] 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

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

[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] 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

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] 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] WxWidget animation twinkling?

2009-07-09 Thread C M
On Thu, Jul 9, 2009 at 3:40 AM, guillaume ranquet wrote: > Hi again. > > I found out that removing the resize handler of the wxpanel gives me a > nice animated plot that works as expected (but with no resize :-/) > > def _SetSize(self): >pixels = tuple(self.parent.GetClientSize()) >self.Se

[Matplotlib-users] limiting zoom range to reasonable values

2010-01-19 Thread C M
Hi, I am using a date plot with the toolbar to allow panning/zooming of the plot. If the user (mischievously) zooms in or out an extreme amount, there are some weird artifacts that I'd rather prevent so as to keep the display looking right and prevent possible crashes and lock-ups. For zooming o

Re: [Matplotlib-users] Transparent plot symbols

2010-01-22 Thread C M
On Fri, Jan 22, 2010 at 2:34 PM, Michael Cohen wrote: > Hi all, > I am making a plot with circle symbols, so I have 'o' in the plot() command. > How do I make those circles transparent? I'd like the center of the > circles to allow the catter plot underneath the circle location to show > through.

[Matplotlib-users] position a wxPython frame near to a matplotlib point

2010-01-22 Thread C M
For those who you wxPython with matplotlib, does anyone know how to do this or can point me in the right direction? I would like to pick a point (that part is fine) and then place a wxFrame near to that point. I'm using something like: #Note: self is a wxPanel that contains the matplotlib plot.

[Matplotlib-users] make autoscale_view even less tight?

2010-02-03 Thread C M
I'm using autoscale_view for the y axis, but find with a marker size > about 10, it will autoscale the graphs such that some markers are bisected by the edges of the frame. I already have it set to: self.subplot.autoscale_view(tight=False, scalex=False, scaley=True) so I'd basically like "ti

[Matplotlib-users] help with view_limits

2010-02-08 Thread C M
I'd like to set the ticks on the y axis such that they do not display anything lower than 0, even if part of the graph below 0 is visible. I tried to do this with ylocator = AutoLocator() ylocator.view_limits(0, 100) self.subplot.yaxis.set_major_locator(ylocator) but it is not changing anything.

Re: [Matplotlib-users] How Does One Learn to Use MatPlotLib?

2010-02-09 Thread C M
wrote: > Subject is the question. > > As I see it, it's useful to know MatLab. A simple query with matplotlib > tutorial shows a number of hits. The first, reference to v0.99.a > documentation barely qualifies. Examples galore and a pretty minimal > introduction. In the first 10 or so hits ther's

Re: [Matplotlib-users] x,y ticklabel too close

2010-02-11 Thread C M
On Thu, Feb 11, 2010 at 12:40 PM, Filipe Pires Alvarenga Fernandes wrote: > Hello list, > > For the following plotI using a large font for the tick-label that causes > the first x,y tick-labels to overlap > > http://yfrog.com/5zimageykp > > for now I'm padding spaces to "fix" the plot, like this:

Re: [Matplotlib-users] Why do xticklabels and yticklabels always collide?

2010-02-12 Thread C M
> My biggest problem with matplotlib is that the smallest yticklabel and > the smallest xticklabel always seem to lie on top of each other (or > close to it).  See attachment for example.  Is there anyway to make it > so these don't lie on top of each other?  How can I make this the > default behav

Re: [Matplotlib-users] make autoscale_view even less tight?

2010-02-12 Thread C M
On Fri, Feb 12, 2010 at 2:24 PM, Stan West wrote: >> From: C M [mailto:cmpyt...@gmail.com] >> Sent: Wednesday, February 03, 2010 21:59 >> >> I'm using autoscale_view for the y axis, but find with a marker size > >> about 10, it will autoscale the graphs suc

[Matplotlib-users] help with a custom formatter

2010-02-12 Thread C M
I would like a custom formatter that does 3 things: 1) Blanks out all the values less than 0. 2) Chooses appropriate major ticks when zoomed out. 3) Shows an integer when the zoom scale is revealing multiple integers, but shows a decimal number when it is just showing within one integer; i.e. if i

Re: [Matplotlib-users] help with a custom formatter

2010-02-13 Thread C M
On Sat, Feb 13, 2010 at 3:00 PM, Jae-Joon Lee wrote: > If you're happy with the default formatter  behavior (which seems to > match with your #3 requirement), just reuse it. > > class MyFormatter(ScalarFormatter): >   def __call__(self, val, pos=None): >       if val < 0: >           return '' >  

[Matplotlib-users] add to a canvas while preserving overall formatting

2010-02-16 Thread C M
I have a mpl graph embedded in wxPython, and I call a function, customize_plot() to do a number of things to the plot: adjust the spacing around it, set the formatters, fontsizes, axis limits, set a grid, etc. Now I want to potentially highlight points (by adding semi-transparent points on top of

Re: [Matplotlib-users] add to a canvas while preserving overall formatting

2010-02-16 Thread C M
On Tue, Feb 16, 2010 at 12:37 PM, John Hunter wrote: > On Tue, Feb 16, 2010 at 11:14 AM, C M wrote: >> I have a mpl graph embedded in wxPython, and I call a function, >> customize_plot() to do a number of things to the plot:  adjust the >> spacing around it, set the format

Re: [Matplotlib-users] hoe to update a plot

2010-02-23 Thread C M
On Tue, Feb 23, 2010 at 7:00 PM, Mathew Yeates wrote: > Hi > I am using gtk and displaying a plot in a FigureCanvas. In response to an > event, I want to update the plot with new data. > > e.g. > self.fig = Figure(figsize=(5,5), dpi=100) > self.ax = fig.add_subplot(111) > ax.plot(data[0,0:,0], > >

Re: [Matplotlib-users] Using IDLE - program still running when graph window is closed

2010-02-24 Thread C M
On Wed, Feb 24, 2010 at 11:51 AM, AG wrote: > How does one ensure that once a graph has been produced by Matplotlib > and that graph has been closed by the user that the program itself stops? > > What I am currently getting is that when I close the graph pop-up window > and then close IDLE, I get

[Matplotlib-users] separate alpha for mfc and mec?

2010-02-28 Thread C M
Would it be possible to have a different alpha (transparency) value for the marker face color and edge color for a single line? (Either currently or as a new feature of mpl). It seems like by default alpha applies to them both. I ask because I am experimenting with getting a different look for t

Re: [Matplotlib-users] embedding a plot function in existing wxapp GUI, problem replotting

2010-03-09 Thread C M
On Tue, Mar 9, 2010 at 2:23 PM, Chris Barker wrote: > Pribadi, Krishna wrote: >> Based on what I’ve been reading regarding MPL, it seems that the >> matplotlib show() function causes another instance of a GUI loop to >> remain suspended. > > right --don't use show(), in fact, don't use pylab for t

Re: [Matplotlib-users] speed up imports?

2010-04-01 Thread C M
On Thu, Apr 1, 2010 at 7:17 PM, Eric Firing wrote: > Andrew Kelly wrote: >> Has anyone had any success in speeding up the mpl imports? >> >> "import matplotlib.pyplot as plt" >> ( or "from matplotlib.figure import Figure") >> >> takes 6 full seconds to load.  That seems excessive.  Any ideas? >> >

[Matplotlib-users] install from svn on Linux not working for me

2010-04-18 Thread C M
My goal is to just get the lastest svn version of matplotlib, or, if not that, just the 0.99 version, up and working on my Linux (Intrepid Ibex) computer.  I checked it matplotlib out from svn fine, and then, as per the webpage, did: > cd matplotlib > python setup.py install and that resulted in

[Matplotlib-users] Fwd: install from svn on Linux not working for me

2010-04-19 Thread C M
-- Forwarded message -- From: C M Date: Mon, Apr 19, 2010 at 1:02 PM Subject: Re: [Matplotlib-users] install from svn on Linux not working for me To: Darren Dale On Mon, Apr 19, 2010 at 8:02 AM, Darren Dale wrote: > On Mon, Apr 19, 2010 at 4:30 AM, LUK ShunTim wrote: >&

[Matplotlib-users] Fwd: install from svn on Linux not working for me

2010-04-19 Thread C M
-- Forwarded message -- From: C M Date: Mon, Apr 19, 2010 at 12:58 PM Subject: Re: [Matplotlib-users] install from svn on Linux not working for me To: LUK ShunTim On Mon, Apr 19, 2010 at 4:30 AM, LUK ShunTim wrote: > On 04/19/2010 01:52 PM, C M wrote: >> My goal is to

Re: [Matplotlib-users] Fwd: install from svn on Linux not working for me

2010-04-19 Thread C M
On Mon, Apr 19, 2010 at 1:31 PM, Mauro Cavalcanti wrote: > As I posted before, I ran across precisely these same errors when > upgrading my Ubuntu box and the Python interpreter. You will need to > install other dependencies as the installation log shows (gtk-2.0+, > pygtk), including its developm

Re: [Matplotlib-users] Fwd: install from svn on Linux not working for me

2010-04-19 Thread C M
Michael and Darren (and others), I've used svn before to download pure Python code, but never to get anything that needed to be built. I'm fairly out to sea here, so thanks for the patience. > When building from source, you also need the header files (*.h files) of all > of matplotlib's dependen

[Matplotlib-users] place a wxPopupWindow based on pick event location

2008-09-23 Thread C M
I'm hoping to get help from matplotlib wxPython backend users... I'm struggling to get what is described in the subject line to work correctly. There was a sort of similar thread from 2006 here: http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg00945.html I want to pick a poi

[Matplotlib-users] sizing plot right when embedded in wxPython

2009-01-16 Thread C M
Hi, this is somewhat of a wxPython issue, maybe, but in the end I think my confusion is in how the sizing of a mpl canvas vs. a figure ought to work, and so I am trying here first. The attached code (a wxPython frame which displays a mpl graph...what most here would call a plot) shows my problem.

[Matplotlib-users] unfilled markers?

2009-01-25 Thread C M
Sorry this is a basic question but I can't figure out where in the docs nor archives I could find this. Is there a built in method for having unfilled markers? (ones that match the line color). I could set mfc (marker face color) to white and mec (marker edge color) to the color of my line, but w

Re: [Matplotlib-users] unfilled markers?

2009-01-25 Thread C M
=9, mfc="None") (Also, since upgrading, now I have a number of things that have changed/are not working in my app, will have to change, but that's probably for the better since I know there are some nice new features in mpl) Any ideas? Thanks, Che > > C M wrote: >> &

Re: [Matplotlib-users] unfilled markers?

2009-01-25 Thread C M
On Sun, Jan 25, 2009 at 6:44 PM, Norbert Nemec wrote: > Sorry for my misleading words - I did not correctly recall my own work from > back then... > > In fact, the code as it is does not change the mec automatically when the > mfc of a filled_marker is set to "None" but leaves it black. I did cons

[Matplotlib-users] plotting durations

2009-01-27 Thread C M
I don't think there is a built-in way to do this, but I thought I'd check first. Can matplotlib (somehow) directly plot a duration of time, such as in the form: 0:01:39.983001 (h:m:s:microsec) Thanks, Che -- This SF.net

[Matplotlib-users] datetutil issues

2009-02-02 Thread C M
I'm doing some date plotting and make use of dateutil. The version I have is given as 1.2-mpl and I believe it installed directly with the latest matplotlib installation. My problem is with dateutil's microsecond precision. An example: >>> date = '2009-01-11 03:55:23.255000' >>> d = dateutil.par

[Matplotlib-users] title pad?

2009-02-08 Thread C M
Is there anything like a title pad, similar to the xaxis.LABELPAD? I'd like to see if the plot would look better with the title a bit higher off the plot. Thanks, Che -- Create and Deploy Rich Internet Apps outside the br

[Matplotlib-users] set color of a single point or bar

2009-02-09 Thread C M
Is it possible to set (and unset) the color of a single point on a line, or an individual bar in a bar chart? Thanks, Che -- Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Ado

[Matplotlib-users] pick the legend? pick a point but not a connecting line?

2009-02-21 Thread C M
Hi, I have two picking questions. First, If I do this inside a pick handler function: def OnPick(self, event): if isinstance(event.artist, Line2D): thisline = event.artist xdata = thisline.get_xdata() ydata = thisline.get_ydata() I can grab the data from

[Matplotlib-users] offset in dragging a legend

2009-03-24 Thread C M
Using mpl 0.98.5.2 in OO mode with wxAgg backend. I'm trying to make my legends draggable. It works, but there is a some inaccuracy with positioning. As I drag it, the cursor "outruns" the position of the legend, and that error grows the further away from the initial starting point the cursor ha

Re: [Matplotlib-users] offset in dragging a legend

2009-03-25 Thread C M
> The event.x and event.y is the position of the mouse, and often this > would not be the position of the legend (lower left corner) you want. > I guess a common practice is to calculate how much your mouse moved > since you started dragging and adjust the position of the legend from > its original

Re: [Matplotlib-users] offset in dragging a legend

2009-03-25 Thread C M
Ok, getting there. When I print the various coordinates to stdout, it SHOULD be working, but my legend is simply disappearing. This is the stdout on one pixel move with the mouse in the x: mouse x position at pick time 489 mouse y position at pick time 349.0 Legend x position at pick time = 445

Re: [Matplotlib-users] offset in dragging a legend

2009-03-25 Thread C M
On Wed, Mar 25, 2009 at 9:06 PM, Jae-Joon Lee wrote: > As I said in my previous email, the _loc attribute of the legend need > to be in the normalized axes coordinate, i.e., the lower left corner > of the axes being (0,0) and the upper-right corner being (1,1). Thus, > it needs to be something lik

Re: [Matplotlib-users] offset in dragging a legend

2009-03-25 Thread C M
On Wed, Mar 25, 2009 at 9:58 PM, Jae-Joon Lee wrote: > Ah, my bad. > > Try > >   self.legend.parent.transAxes.inverted().transform_point(loc_in_canvas) > > legend.parent points to the parent axes. > > -JJ > That cleared up the error, thanks. But it is still not actually moving the legend. The c

Re: [Matplotlib-users] offset in dragging a legend

2009-03-25 Thread C M
On Thu, Mar 26, 2009 at 12:19 AM, Jae-Joon Lee wrote: > Sorry, It's hard to track down what's wrong without actually running the code. I really appreciate your patience. > Change > >  self.legend._loc = loc_in_norm_axes > > to > >  self.legend._loc = tuple(loc_in_norm_axes) > > and see if it wor

[Matplotlib-users] modifying the toolbar?

2009-03-26 Thread C M
Hi, I have just begun including the toolbar in an embedded (in wx) use of mpl, and am really pleased with how easily it provides very useful functions. Once again, mpl shines. But I would like to try to modify the toolbar for my application, e.g. probably remove the "configure subplots" tool (n/a

Re: [Matplotlib-users] modifying the toolbar?

2009-03-27 Thread C M
On Fri, Mar 27, 2009 at 1:56 AM, Eric Firing wrote: > C M wrote: >> >> Hi, I have just begun including the toolbar in an embedded (in wx) >> use of mpl, and am really pleased with how easily it provides very >> useful functions.  Once again, mpl shines. >> >>

[Matplotlib-users] grab more points from a database when panning?

2009-03-30 Thread C M
I've got the NavigationToolbar2 going nicely on my app (OO, embedded in wx, mpl 0.98.5), and was wondering how difficult it might be to change how the pan works, in the following way... Right now, when I show a plot, I am grabbing a subset of data from the database. Panning within that plot allow

[Matplotlib-users] change hour format in date plotting

2009-04-03 Thread C M
I am pretty happy with the default for how dates ticks are updated with zooming the plot with the navigation toolbar...until it gets down to the level of hours. Hours are by default displayed in a format like: "23:00:00 UTC". How can I get it to display it in a more common way, such as "11:00 pm"

[Matplotlib-users] preventing scaling view after updating plot

2009-04-08 Thread C M
(mpl 0.98.5 OO embedded in wx) Hi, I'm trying to highlight a picked datapoint, such as is shown in this thread: http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg05580.html As John suggested there, I get the index of the picked point, and then plot a marker on that point. I

Re: [Matplotlib-users] preventing scaling view after updating plot

2009-04-08 Thread C M
> > I tried this, and it did stop autoscaling--but I do want y autoscaling. > What I want is y autoscaling but not y autoscaling (just setting xlims). > I tried adding either of these lines right before or right after when I > plotted > the highlighted point: Just to be clearer: What I want is t

Re: [Matplotlib-users] preventing scaling view after updating plot

2009-04-09 Thread C M
On Thu, Apr 9, 2009 at 9:25 AM, Ryan May wrote: > On Thu, Apr 9, 2009 at 1:04 AM, C M wrote: >> >> > >> > I tried this, and it did stop autoscaling--but I do want y autoscaling. >> > What I want is y autoscaling but not y autoscaling (just setting xlims).

[Matplotlib-users] tweaking automatic date formatting?

2009-04-13 Thread C M
Hi, I've asked this before but still am stuck. I want to use mpl's automatic tick locating and date formatting for a zoomable date plot, OTHER THAN the hour formatting. The default hour formatting (when zoomed in on 1 day) is like "05:00:00 UTC", but I'd like to be of the form something more read

Re: [Matplotlib-users] tweaking automatic date formatting?

2009-04-14 Thread C M
Thanks, Ryan, John, and Pierre... I will try to change it at the point John suggests, maybe inspired by scikits.timeseries (or just using it). btw, I think adding the ability to set the AutoDateFormat formatting choices per scale would be a good small addition to mpl. (Maybe that is what the com

Re: [Matplotlib-users] Boxplots overlayed with plots

2009-05-10 Thread C M
On Mon, May 11, 2009 at 12:52 AM, Gökhan SEVER wrote: > And the answer is: > > axis(xmin=..., xmax=...) > > Probably, that was a very easy question and no one wanted to answer :) > > Gökhan > > > On Sun, May 10, 2009 at 4:12 PM, Gökhan SEVER wrote: >> >> Hello, >> >> I overlay bunch of boxplots w

Re: [Matplotlib-users] Boxplots overlayed with plots

2009-05-11 Thread C M
On Mon, May 11, 2009 at 3:06 AM, Eric Firing wrote: > C M wrote: >> >> On Mon, May 11, 2009 at 12:52 AM, Gökhan SEVER >> wrote: >>> >>> And the answer is: >>> >>> axis(xmin=..., xmax=...) >>> >>> Probably, that was a very

[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] 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.

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-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

[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] 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

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

[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] 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] 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] 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] 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] 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

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] 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

[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] 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

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

[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] 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

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-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

[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

[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] 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 ---

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] 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 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

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] 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] 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

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] 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 >>>  

[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

[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] 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

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

  1   2   >