[Matplotlib-users] Figure points vs. figure pixels

2012-02-15 Thread Justin McCann
I have some figures with multiple axes stacked on top of each other, generated with Figure.add_subplot(). In each figure, some sets of these axes are logically grouped together, and I need some visual clue of which axes are more closely related. The right way is probably to use GridSpec [ http://m

Re: [Matplotlib-users] how to surpress figure pop out within interactive ipython shell?

2011-12-15 Thread Justin McCann
On Thu, Dec 15, 2011 at 12:33 PM, Chao YUE wrote: > Dear matplotlib users, > > How can I surpress the figure pop out when I make plot within the ipython > interactive shell? > suppose I make a figure first and I want to save it: > > fig=plt.figure() > ax=fig.add_subplot(111) > ax.plot(np.arange(1

Re: [Matplotlib-users] |--------| Annotation

2011-10-28 Thread Justin McCann
On Fri, Oct 28, 2011 at 6:31 AM, Paul Hilscher wrote: > Dear all, > first of all thank you for the this awesome plotting library :D. > I have a logarithmic plot where I want to stress out a specific range using > a line like > y    Something > |   |---| > |   ___ > |  /    

Re: [Matplotlib-users] change background

2011-07-14 Thread Justin McCann
On Thu, Jul 14, 2011 at 3:57 PM, T. Tofus von Blisstein wrote: > Hi, > > how can I invert the colors of axes/background from black/white to > white/black? > > thanks... I have been googling for a while... If you want to do it for all your plots, you can mess with all of the 'color*' settings in

Re: [Matplotlib-users] Question on LineCollection

2011-07-14 Thread Justin McCann
On Wed, Jul 13, 2011 at 6:49 PM, Benjamin Root wrote: > On Wednesday, July 13, 2011, Justin McCann wrote: >> $ ipython -pylab >> # >> from matplotlib.collections import LineCollection >> f = figure() >> plot() >> ax = gca() >> vec = numpy.random.

Re: [Matplotlib-users] Question on LineCollection

2011-07-13 Thread Justin McCann
2011/7/13 SULSEUNG-JIN : > Thanks, Justin > > I think I made a confusing example code. Here comes new one: Maybe you just need to force a call to draw() and set your x/y limits. This works for me on matplotlib 1.0.1 $ ipython -pylab # from matplotlib.collections import LineCollection f = fig

Re: [Matplotlib-users] Question on LineCollection

2011-07-13 Thread Justin McCann
2011/7/13 SULSEUNG-JIN : > Hi, > > I'm plotting thousands of short lines on a plot. Because "plot" and "Line2D" > are quite slow for this case, I'm trying to use lineCollection. Here comes > the part of my testing code: > >     ... >     segs = [] > >     # Manual set for testing >     x2 = np.zero

Re: [Matplotlib-users] is a changing background color possible?

2011-06-21 Thread Justin McCann
On Tue, Jun 21, 2011 at 1:50 PM, Frank wrote: > matplotlib python: How do you change the background color of a line plot > according to a given column? Say I have the following data file >... > 2. 1 > 3. 1 > 3. 2 > > The first column represents the y-values, and the 2nd column should control > the

Re: [Matplotlib-users] remove white area around

2011-06-14 Thread Justin McCann
On Mon, Jun 13, 2011 at 8:37 AM, Andrea Crotti wrote: > > I found this question asked other times, but trying myself there is no > way that I get something working.. > > So I just want to generate a pdf from a plot with the smallest possible > margin, and I was trying for example this: > >fig

Re: [Matplotlib-users] show density in scatter

2011-05-18 Thread Justin McCann
On Wed, May 18, 2011 at 3:01 PM, Neal Becker wrote: > Using scatter, it seems less probably (numerous) points show just as much > as > more probable points. Can anyone suggest a good way to emphasize the more > probable points? > > I was thinking maybe the easy way is just scale down the markers

Re: [Matplotlib-users] Feature request: automatic scaling of subplots, margins, etc

2011-05-11 Thread Justin McCann
On Wed, May 11, 2011 at 1:59 PM, Benjamin Root wrote: > ... > Most things, we do know the sizes of. It is my understanding that it is > the text objects that is the unknown. If this could be solved, then a > layout engine would be much more feasible. The problem is that even LaTeX > has to re-

Re: [Matplotlib-users] Drawing on plots

2011-05-02 Thread Justin McCann
You'll want to use event handling to figure out where the user clicked, and then you have a couple of options: Axes.vlines(), or pylab.axvline(). It seems like pylab.axvline() will always span the entire y-axis by default, but with Axes.vlines() you need to specify the ymin/ymax. Maybe someone else

Re: [Matplotlib-users] Limit legend to visible data

2010-12-03 Thread Justin McCann
On Wed, Dec 1, 2010 at 11:58 AM, Justin McCann wrote: > Is there a straightforward way to limit the legend only to lines that > appear within the current display limits? I have a plot that has too > many separate data series to show on the legend at once, but once I > zoom in it woul

[Matplotlib-users] Limit legend to visible data

2010-12-01 Thread Justin McCann
Is there a straightforward way to limit the legend only to lines that appear within the current display limits? I have a plot that has too many separate data series to show on the legend at once, but once I zoom in it would be good to re-set the legend to show only the visible data points/lines. I

Re: [Matplotlib-users] How should I plot clustered data?

2010-11-04 Thread Justin McCann
On Wed, Nov 3, 2010 at 1:18 AM, David Frey wrote: > ... > My data in the y-axis (address space usage) is fairly uniform (0-2000 MB > values), but my data in the x-axis (the time at which the the trace statements > were executed) is highly clustered.  For example, I have approximately 150 > data po

Re: [Matplotlib-users] Xtick label size in ImageGrid

2010-10-19 Thread Justin McCann
On Fri, Oct 8, 2010 at 11:10 PM, Jae-Joon Lee wrote: > The label_mode need to be capital "L", instead of "l". I guess this > will fix your first problem. > While we make "l" same as "L", but I think it actually degrade the > readability of the code, and I;m inclined to leave it as is. Let me > kno

[Matplotlib-users] Xtick label size in ImageGrid

2010-10-08 Thread Justin McCann
I just refactored some custom code to make use of axes_grid1.ImageGrid, and I think I've come across a bug (see below). It looks like the tick labelsize doesn't get passed properly to the parasite axes. I'm using Python2.6, matplotlib-1.0.0 release, and the Qt4Agg backend. Also, I noticed that th

Re: [Matplotlib-users] Vlines across multiple subplots

2010-10-07 Thread Justin McCann
On Thu, Oct 7, 2010 at 4:08 PM, Benjamin Root wrote: > ... >> On Thu, Oct 7, 2010 at 3:09 PM, Justin McCann wrote: >> >>> ... >> >> I'd like to annotate across all of the subplots by placing a vertical line >>> (or vspan) across the entire fig

Re: [Matplotlib-users] Vlines across multiple subplots

2010-10-07 Thread Justin McCann
Sorry about that; don't know what key combo I pushed. Completed email is below. On Thu, Oct 7, 2010 at 3:09 PM, Justin McCann wrote: > I have several heatmap images, which I place in subplots stacked > vertically. I've been using >ax = figure.add_subplot(nplots, 1, plot

[Matplotlib-users] Vlines across multiple subplots

2010-10-07 Thread Justin McCann
I have several heatmap images, which I place in subplots stacked vertically. I've been using ax = figure.add_subplot(nplots, 1, plotnum) ax.imshow(...) to add each subsequent heatmap, and then place -- Beautiful is w

Re: [Matplotlib-users] Compilation Error

2010-10-04 Thread Justin McCann
On Mon, Oct 4, 2010 at 4:50 PM, Sanjay Kairam wrote: > Hi there, > > I'm having a problem installing matplotlib, I'm guessing that I am missing > some dependency, but I am having trouble figuring out what the issue is (I >... > REQUIRED DEPENDENCIES > numpy: 1.5.0 > f

Re: [Matplotlib-users] Making room for tick labels

2010-09-30 Thread Justin McCann
On Wed, Sep 29, 2010 at 9:58 PM, Jason Grout wrote: >... > I made the FAQ entry code a little more general (and hopefully more > robust) a while ago.  I don't know if it takes care of the problem > you're talking about, though. > > I posted it to the matplotlib-devel mailing list here: > > http://

[Matplotlib-users] Making room for tick labels

2010-09-29 Thread Justin McCann
Not to pile on the "auto-adjust to make labels fit" bandwagon, but I've been following the FAQ on adjusting the subplot locations to make room for too-long tick labels: http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels and have found that the FAQ cod

Re: [Matplotlib-users] Labeling/distinguishing lots of curves on a single plot

2010-08-23 Thread Justin McCann
Here are a couple of functions you might try, with a few colors and line styles I use: import itertools from pylab import * COLORS = ['#990033', '#FF', '#00FF00', '#F79E00', '#ff00ff', '#0080FF', '#FF', '#2D0668', '#2EB42E', '#ff6633', '#8000ff', '#33',