[Matplotlib-users] Embed logo in plot at actual size

2009-11-16 Thread Jason Heeris
Hi, I'd like to know if it's possible to do something like this in matplotlib: I want to create a 2D plot with legend, output as PNG. I also want to embed a logo in it, in the top right corner of the plotting area. If the original logo image is a 40px by 40px PNG, I want it to appear at that size

[Matplotlib-users] Import pylab fails from c-code

2009-11-16 Thread markus . proeller
Hello everyone, I use the following C-Code in visual studio 2005 (I start the program with "Release" configuration): #include #include using namespace std; void main() { Py_Initialize(); while (1) { char test[100] = {}; cout<<">>> ";

[Matplotlib-users] hist without really ploting

2009-11-16 Thread Tsviki Hirsh
Dear list, How can I use hist without plotting? e.g. h=hist(Z) and then to only use the output of "h" without wasting time on plotting? Thanks, Tsviki Hirsh -- Let Crystal Reports handle the reporting - Free Crystal Repor

Re: [Matplotlib-users] hist without really ploting

2009-11-16 Thread Matthias Michler
Hi, you may want to use numpy's histogram: import numpy as np np.histogram(Z) Kind regards Matthias On Monday 16 November 2009 14:32:03 Tsviki Hirsh wrote: > Dear list, > How can I use hist without plotting? > e.g. > h=hist(Z) > > and then to only use the output of "h" without wasting time on p

Re: [Matplotlib-users] hist without really ploting

2009-11-16 Thread John Hunter
On Mon, Nov 16, 2009 at 7:32 AM, Tsviki Hirsh wrote: > Dear list, > How can I use hist without plotting? > e.g. > h=hist(Z) > and then to only use the output of "h" without wasting time on plotting? Use numpy.histogram -- that's what mpl uses. JDH --

Re: [Matplotlib-users] Import pylab fails from c-code

2009-11-16 Thread John Hunter
On Mon, Nov 16, 2009 at 6:16 AM, wrote: > > Hello everyone, > > I use the following C-Code in visual studio 2005 (I start the program with > "Release" configuration): > > #include > #include > using namespace std; > > void main() > { >         Py_Initialize(); > >         while (1) >         {

Re: [Matplotlib-users] Docked/tabbed figures in one window?

2009-11-16 Thread John Hunter
On Fri, Nov 13, 2009 at 2:24 PM, Christopher Barker wrote: > qu...@gmx.at wrote: >> I would like to be able to dock some figures into one window >> and be able to look at them by tabs or something similar. >> >> Is something like that already implemented or does someone know >> of a widget that ca

Re: [Matplotlib-users] Embed logo in plot at actual size

2009-11-16 Thread John Hunter
On Mon, Nov 16, 2009 at 4:12 AM, Jason Heeris wrote: > Hi, > > I'd like to know if it's possible to do something like this in matplotlib: > > I want to create a 2D plot with legend, output as PNG. I also want to > embed a logo in it, in the top right corner of the plotting area. If > the original

[Matplotlib-users] usetex=True and savefig(eps-file)

2009-11-16 Thread Matthias Michler
Hello list, I encounter some strange error output including several "Permission denied" when using usetex=True and saveing eps-pictures. My example is quite easy and the output is attached. (Please notice the resulting figure looks as expected.) import matplotlib matplotlib.rc('text', usetex=T

[Matplotlib-users] Antwort: Re: Import pylab fails from c-code

2009-11-16 Thread markus . proeller
John Hunter schrieb am 16.11.2009 15:14:31: > On Mon, Nov 16, 2009 at 6:16 AM, wrote: > > > > Hello everyone, > > > > I use the following C-Code in visual studio 2005 (I start the program with > > "Release" configuration): > > > > #include > > #include > > using namespace std; > > > > void m

[Matplotlib-users] pcolormesh control color levels

2009-11-16 Thread Andres Luhamaa
Hello, I want to plot two sets of masked data on a single plot and I can not get exactly the kind of image I want to. I have tried pcolormesh and contourf and both have problems. With contourf the inner data does not look smooth and sometimes has a row of missing data around it, with pcolormes

Re: [Matplotlib-users] Embed logo in plot at actual size

2009-11-16 Thread Jason Heeris
John Hunter wrote: > See > > http://matplotlib.sourceforge.net/examples/api/watermark_image.html > > for an example of embedding a watermark image in mpl. > > > To compute figure size, multiply the DPI setting by the figure > dimensions in inches: This is a good place to start, so thanks :)

[Matplotlib-users] Customizing an errorbar plot

2009-11-16 Thread Donovan Parks
Hello, I am hoping someone more familiar with matplotlib can tell me if it is possible to customize an errorbar plot such that each marker has a different colour. That is, I'd like to set the markerfacecolor property of each marker in the errorbar plot. Is this possible? I've been trying to figur

Re: [Matplotlib-users] Drawing a single contour line

2009-11-16 Thread Brendan Arnold
Hmm, after a little more work it seems that the problem is actually with the 'clabel' command. To expand on Eric's example, x = arange(5) y = arange(7) X, Y = meshgrid(x,y) z = X+Y c=contour(X, Y, z, [5]) clabel(c, inline=1) (causes exceptions in a fresh ipython session) clabel causes problems i

[Matplotlib-users] clabel placement

2009-11-16 Thread Jeffrey Fogel
Is there a way to define the label placements created by clabel? My problem is that the location of the automatic labels are almost impossible to read on my plot. I've tried adding "manual" to the call, but it doesn't seem to work on my computer. -Jeffrey

[Matplotlib-users] Are nested axes possible?

2009-11-16 Thread John Didion
I am trying to generate a figure of some genomic data. Basically, I want to show how many times a certain event happens within each one megabase window of each chromosome. The X axis is the chromosomal position (unit is megabases) and the Y axis is chromosome number (1-19, X, Y, M in mouse).

Re: [Matplotlib-users] Drawing a single contour line

2009-11-16 Thread Eric Firing
Brendan Arnold wrote: > Hmm, after a little more work it seems that the problem is actually > with the 'clabel' command. To expand on Eric's example, > > x = arange(5) > y = arange(7) > X, Y = meshgrid(x,y) > z = X+Y > c=contour(X, Y, z, [5]) > clabel(c, inline=1) > > (causes exceptions in a fres

[Matplotlib-users] loadtxt/usecols -> list index out of range

2009-11-16 Thread Manuel Wittchen
Hi, I'm trying to make my first matplotlib-plot from a datafile. The datafile is tab-separated and looks like this: # x-axisy-axis 0 1 1 2 2 3 3 4 4 5 5 6 So my ploting-script is: #!/usr/bin/env python from pylab import * import numpy as np inputfile

Re: [Matplotlib-users] loadtxt/usecols -> list index out of range

2009-11-16 Thread Ryan May
On Mon, Nov 16, 2009 at 4:34 PM, Manuel Wittchen wrote: > Hi, > > I'm trying to make my first matplotlib-plot from a datafile. The > datafile is tab-separated and looks like this: > # x-axis        y-axis > 0       1 > 1       2 > 2       3 > 3       4 > 4       5 > 5       6 > > So my ploting-scr

Re: [Matplotlib-users] loadtxt/usecols -> list index out of range

2009-11-16 Thread Gökhan Sever
On Mon, Nov 16, 2009 at 4:34 PM, Manuel Wittchen wrote: > Hi, > > I'm trying to make my first matplotlib-plot from a datafile. The > datafile is tab-separated and looks like this: > # x-axisy-axis > 0 1 > 1 2 > 2 3 > 3 4 > 4 5 > 5 6 > > So my ploting-scr

Re: [Matplotlib-users] Are nested axes possible?

2009-11-16 Thread Gökhan Sever
On Mon, Nov 16, 2009 at 2:30 PM, John Didion wrote: > > > I am trying to generate a figure of some genomic data. Basically, I want to > show how many times a certain event happens within each one megabase window > of each chromosome. The X axis is the chromosomal position (unit is > megabases) an

Re: [Matplotlib-users] close-event

2009-11-16 Thread Christopher Barker
> On Fri, Nov 13, 2009 at 10:39 AM, Gregor Thalhammer > wrote: >> 1) I would like to stay independent of the backend, therefore I would >> prefer a approach like in idle_and_timeout >> http://matplotlib.sourceforge.net/examples/event_handling/idle_and_timeout.html >> However, with my default back

Re: [Matplotlib-users] loadtxt/usecols -> list index out of range

2009-11-16 Thread Manuel Wittchen
Problem solved!** Thanks for all the tipps, but they didn't fix the problem. There never was a problem with usecols or something. My mistake was, that I've used the plot-script-file as the datainput-file, by accident. Sorry for wasting your time with this. I think it's too late (00:

Re: [Matplotlib-users] Drawing a single contour line

2009-11-16 Thread Eric Firing
Brendan Arnold wrote: > Hmm, after a little more work it seems that the problem is actually > with the 'clabel' command. To expand on Eric's example, > > x = arange(5) > y = arange(7) > X, Y = meshgrid(x,y) > z = X+Y > c=contour(X, Y, z, [5]) > clabel(c, inline=1) > > (causes exceptions in a fres