You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
(1) |
2
(12) |
3
(12) |
4
(19) |
5
(7) |
6
(6) |
7
(2) |
|
8
(2) |
9
(11) |
10
(15) |
11
(27) |
12
(27) |
13
(18) |
14
(3) |
|
15
(3) |
16
(25) |
17
(9) |
18
(3) |
19
(4) |
20
(2) |
21
(4) |
|
22
(9) |
23
(28) |
24
(18) |
25
(16) |
26
(9) |
27
(4) |
28
(13) |
|
29
(15) |
30
(33) |
|
|
|
|
|
|
From: Eric F. <ef...@ha...> - 2009-11-16 23:55:05
|
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 fresh ipython session) > > clabel causes problems if only a single contour level is specified and returned. > > Maybe this is a bug? Fixed in svn 7970, 7971 (branch and trunk). Eric |
|
From: Manuel W. <man...@gm...> - 2009-11-16 23:37:15
|
********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:34 AM here), I have to go to bed and get
some sleep....
Manuel
2009/11/16 Gökhan Sever <gok...@gm...>:
>
>
> On Mon, Nov 16, 2009 at 4:34 PM, Manuel Wittchen <man...@gm...>
> 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-script is:
>>
>> #!/usr/bin/env python
>> from pylab import *
>> import numpy as np
>>
>> inputfile = '/home/manu/matplotlib-examples/simple_plot.py'
>>
>> x,y = np.loadtxt(inputfile, dtype='float', comments='#',
>> delimiter="\t", converters=None, skiprows=0, usecols=(0,1),
>> unpack=True)
>> plot(x, y, linewidth=1.0)
>> xlabel('time (s)')
>> ylabel('voltage (mV)')
>> title('About as simple as it gets, folks')
>> grid(True)
>> show()
>>
>> It worked fine for me once, but as I tried to start the script again I
>> get an IndexError:
>>
>> Traceback (most recent call last):
>> File "./simple_plot.py", line 7, in <module>
>> x,y = np.loadtxt(inputfile, dtype='float', comments='#',
>> delimiter="\t", converters=None, skiprows=0, usecols=(0,1),
>> unpack=True)
>> File "/usr/lib/python2.6/dist-packages/numpy/lib/io.py", line 486, in
>> loadtxt
>> vals = [vals[i] for i in usecols]
>> IndexError: list index out of range
>>
>> Seems to me that usecols has "to much input" (don't know how to call
>> it), but why did it work before?
>
> This is an interesting behaviour. I don't exactly know why it happens as you
> described, but If you would like something working try this:
>
> Slightly modify your data file to be consistent --equal spaces or tabs
>
> x,y = np.loadtxt("data", dtype='float', delimiter=" ", skiprows=1).T
>
> As simple as it gets, the above line successfully loads the data.
>
> Give it a try...
>
>>
>> Manuel
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and focus
>> on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now. http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
> --
> Gökhan
>
|
|
From: Christopher B. <Chr...@no...> - 2009-11-16 23:28:09
|
> On Fri, Nov 13, 2009 at 10:39 AM, Gregor Thalhammer > <Gre...@i-...> 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 backend WXAgg I do not continuously idle >> events, but only once e.g. after each mouse movement. Can someone give >> me more information about the intended behaviour, current status and >> support of idle events? Well, yes, that is how wx idle events work. I have no idea how any other toolkits do idle events. As a result, I've found that I never use EVT_IDLE with wx -- it just isn't useful, you get a whole bunch of them when someone is doing something like moving the mouse slowly, and none when the user is doing nothing. What I have done is use a wx.Timer instead -- if you want something to happen when the user isn't doing anything, you can start a timer, and have it fire whenever you want. You can also have the timer started by an IDLE event, and have each subsequent IDLE event I don't know if MPL has a Timer that wraps the GUI toolkit timers, but that may be a good idea. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Gökhan S. <gok...@gm...> - 2009-11-16 23:17:38
|
On Mon, Nov 16, 2009 at 2:30 PM, John Didion <jd...@em...> 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) and the Y axis is chromosome number (1-19, X, Y, M in mouse). For > each chromosome, I want a subplot on which I will draw a bar graph. So > basically, there will be 22 subplots, each with their own axes, and also X > and Y axes for the entire figure. > > I know how to do subplots, I just don't know how to get the overall figure > axes. Can anyone help? > > I will try to sketch out below with some ascii art what I want in case this > description isn't clear. > > > | ||||||||||| | | |||| |||| | > 1 |-------------------------------------- > | |||| || ||||||| ||||| > 2 |-------------------------------------- > | > . | > ||||| || | | ||| |||| || > 19 |-------------------------------------- > | |||||| | ||| | | || > X |-------------------------------------- > || ||| ||||| > Y |-------------------------------------- > | || ||||| ||||| > M |-------------------------------------- > | > -------------------------------------- > 0 50 100 150 200 > Megabases > > > Thanks! > > Spines should do what you are seeking after. Check the example: http://matplotlib.sourceforge.net/examples/pylab_examples/spine_placement_demo.html#pylab-examples-spine-placement-demo > -- > John Didion > Computational Biology, PhD Student > Fernando Pardo-Manuel de Villena Lab > UNC Chapel Hill > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Gökhan |
|
From: Gökhan S. <gok...@gm...> - 2009-11-16 22:53:43
|
On Mon, Nov 16, 2009 at 4:34 PM, Manuel Wittchen
<man...@gm...>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-script is:
>
> #!/usr/bin/env python
> from pylab import *
> import numpy as np
>
> inputfile = '/home/manu/matplotlib-examples/simple_plot.py'
>
> x,y = np.loadtxt(inputfile, dtype='float', comments='#',
> delimiter="\t", converters=None, skiprows=0, usecols=(0,1),
> unpack=True)
> plot(x, y, linewidth=1.0)
> xlabel('time (s)')
> ylabel('voltage (mV)')
> title('About as simple as it gets, folks')
> grid(True)
> show()
>
> It worked fine for me once, but as I tried to start the script again I
> get an IndexError:
>
> Traceback (most recent call last):
> File "./simple_plot.py", line 7, in <module>
> x,y = np.loadtxt(inputfile, dtype='float', comments='#',
> delimiter="\t", converters=None, skiprows=0, usecols=(0,1),
> unpack=True)
> File "/usr/lib/python2.6/dist-packages/numpy/lib/io.py", line 486, in
> loadtxt
> vals = [vals[i] for i in usecols]
> IndexError: list index out of range
>
> Seems to me that usecols has "to much input" (don't know how to call
> it), but why did it work before?
>
This is an interesting behaviour. I don't exactly know why it happens as you
described, but If you would like something working try this:
Slightly modify your data file to be consistent --equal spaces or tabs
x,y = np.loadtxt("data", dtype='float', delimiter=" ", skiprows=1).T
As simple as it gets, the above line successfully loads the data.
Give it a try...
>
> Manuel
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
Gökhan
|
|
From: Ryan M. <rm...@gm...> - 2009-11-16 22:50:06
|
On Mon, Nov 16, 2009 at 4:34 PM, Manuel Wittchen
<man...@gm...> 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-script is:
>
> #!/usr/bin/env python
> from pylab import *
> import numpy as np
>
> inputfile = '/home/manu/matplotlib-examples/simple_plot.py'
>
> x,y = np.loadtxt(inputfile, dtype='float', comments='#',
> delimiter="\t", converters=None, skiprows=0, usecols=(0,1),
> unpack=True)
> plot(x, y, linewidth=1.0)
> xlabel('time (s)')
> ylabel('voltage (mV)')
> title('About as simple as it gets, folks')
> grid(True)
> show()
>
> It worked fine for me once, but as I tried to start the script again I
> get an IndexError:
>
> Traceback (most recent call last):
> File "./simple_plot.py", line 7, in <module>
> x,y = np.loadtxt(inputfile, dtype='float', comments='#',
> delimiter="\t", converters=None, skiprows=0, usecols=(0,1),
> unpack=True)
> File "/usr/lib/python2.6/dist-packages/numpy/lib/io.py", line 486, in loadtxt
> vals = [vals[i] for i in usecols]
> IndexError: list index out of range
>
> Seems to me that usecols has "to much input" (don't know how to call
> it), but why did it work before?
Check your data file. What you posted to the list is copy/pasting as
8 spaces for me, but you are specifying delimiter='\t'. I'd try just
not specifying delimiter or passing in delimiter=None.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
|
|
From: Manuel W. <man...@gm...> - 2009-11-16 22:34:52
|
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-script is:
#!/usr/bin/env python
from pylab import *
import numpy as np
inputfile = '/home/manu/matplotlib-examples/simple_plot.py'
x,y = np.loadtxt(inputfile, dtype='float', comments='#',
delimiter="\t", converters=None, skiprows=0, usecols=(0,1),
unpack=True)
plot(x, y, linewidth=1.0)
xlabel('time (s)')
ylabel('voltage (mV)')
title('About as simple as it gets, folks')
grid(True)
show()
It worked fine for me once, but as I tried to start the script again I
get an IndexError:
Traceback (most recent call last):
File "./simple_plot.py", line 7, in <module>
x,y = np.loadtxt(inputfile, dtype='float', comments='#',
delimiter="\t", converters=None, skiprows=0, usecols=(0,1),
unpack=True)
File "/usr/lib/python2.6/dist-packages/numpy/lib/io.py", line 486, in loadtxt
vals = [vals[i] for i in usecols]
IndexError: list index out of range
Seems to me that usecols has "to much input" (don't know how to call
it), but why did it work before?
Manuel
|
|
From: Eric F. <ef...@ha...> - 2009-11-16 20:36:37
|
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 fresh ipython session) > > clabel causes problems if only a single contour level is specified and returned. > > Maybe this is a bug? It certainly is. If no one comes up with a fix within a day or two, please file a ticket. Eric > > Kind regards, > > Brendan > > On Wed, Nov 4, 2009 at 6:01 PM, Eric Firing <ef...@ha...> wrote: >> John Hunter wrote: >>> On Wed, Nov 4, 2009 at 11:16 AM, Brendan Arnold <bre...@gm...> >>> wrote: >>>> Ah, I was a little confused by what you wrote John (I though I had to >>>> access contour through the axes object and the meaning of R, F, dR was >>>> a little unclear..) however using the 'levels' keyword now works. i.e. >>>> >>>> plt.contour(x, y, z, levels=[0]) >>>> >>>> Incidentally, this keyword (levels) is not documented at >>>> >>>> http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.contour >>>> and in fact the documentation implies that contour(kx, ky, z, [0]) >>>> should work when it does not. >> But it does work, as it should: >> >> x = arange(5) >> y = arange(7) >> X, Y = meshgrid(x,y) >> z = X+Y >> contour(X, Y, z, [5]) >> >> >> Drop the above into "ipython -pylab". >> >> Eric >> >>>> Perhaps the docs could be updated to reflect this? >>> Thanks for the heads up -- I updated the docstring in svn HEAD >>> >>> Sorry the original example was confusing -- I cut and pasted from some >>> code I was working on, and forgot to import the mindreading module >>> >>> JDH >>> >>> >>> ------------------------------------------------------------------------------ >>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >>> 30-Day trial. Simplify your report design, integration and deployment - and >>> focus on what you do best, core application coding. Discover what's new with >>> Crystal Reports now. http://p.sf.net/sfu/bobj-july >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: John D. <jd...@em...> - 2009-11-16 20:31:46
|
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). For each chromosome, I want a subplot on which I will draw a bar graph. So basically, there will be 22 subplots, each with their own axes, and also X and Y axes for the entire figure.
I know how to do subplots, I just don't know how to get the overall figure axes. Can anyone help?
I will try to sketch out below with some ascii art what I want in case this description isn't clear.
| ||||||||||| | | |||| |||| |
1 |--------------------------------------
| |||| || ||||||| |||||
2 |--------------------------------------
|
. |
||||| || | | ||| |||| ||
19 |--------------------------------------
| |||||| | ||| | | ||
X |--------------------------------------
|| ||| |||||
Y |--------------------------------------
| || ||||| |||||
M |--------------------------------------
|
--------------------------------------
0 50 100 150 200
Megabases
Thanks!
--
John Didion
Computational Biology, PhD Student
Fernando Pardo-Manuel de Villena Lab
UNC Chapel Hill
|
|
From: Jeffrey F. <mat...@je...> - 2009-11-16 19:52:31
|
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 |
|
From: Brendan A. <bre...@gm...> - 2009-11-16 19:14:34
|
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 if only a single contour level is specified and returned. Maybe this is a bug? Kind regards, Brendan On Wed, Nov 4, 2009 at 6:01 PM, Eric Firing <ef...@ha...> wrote: > John Hunter wrote: >> >> On Wed, Nov 4, 2009 at 11:16 AM, Brendan Arnold <bre...@gm...> >> wrote: >>> >>> Ah, I was a little confused by what you wrote John (I though I had to >>> access contour through the axes object and the meaning of R, F, dR was >>> a little unclear..) however using the 'levels' keyword now works. i.e. >>> >>> plt.contour(x, y, z, levels=[0]) >>> >>> Incidentally, this keyword (levels) is not documented at >>> >>> http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.contour >>> and in fact the documentation implies that contour(kx, ky, z, [0]) >>> should work when it does not. > > But it does work, as it should: > > x = arange(5) > y = arange(7) > X, Y = meshgrid(x,y) > z = X+Y > contour(X, Y, z, [5]) > > > Drop the above into "ipython -pylab". > > Eric > >>> >>> Perhaps the docs could be updated to reflect this? >> >> Thanks for the heads up -- I updated the docstring in svn HEAD >> >> Sorry the original example was confusing -- I cut and pasted from some >> code I was working on, and forgot to import the mindreading module >> >> JDH >> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day trial. Simplify your report design, integration and deployment - and >> focus on what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Donovan P. <don...@gm...> - 2009-11-16 18:41:18
|
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 figure out what the returned objects from errorbar are, but haven't had any luck finding this documented anywhere. Thanks for any and all help. Cheers, Donovan |
|
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2009-11-16 15:57:46
|
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 :) I'll keep poking around, but do you know if it's possible to get the location of the plot area *within* the image? That is, the coordinates of the area within the axes? Cheers, Jason |
|
From: Andres L. <and...@ut...> - 2009-11-16 15:07:33
|
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 pcolormesh, on the other hand, I can not control the levels in the way I want to. So, as is in the documentation, contourf may have problems with masked data, so I can skip that solution. But how do I achieve controlled color levels as I can do with contourf, but using pcolormesh? Attached code illustrates the images I get with two methods. Best regards, Andres |
|
From: <mar...@if...> - 2009-11-16 15:02:37
|
John Hunter <jd...@gm...> schrieb am 16.11.2009 15:14:31:
> On Mon, Nov 16, 2009 at 6:16 AM, <mar...@if...> wrote:
> >
> > Hello everyone,
> >
> > I use the following C-Code in visual studio 2005 (I start the program
with
> > "Release" configuration):
> >
> > #include <Python.h>
> > #include <iostream>
> > using namespace std;
> >
> > void main()
> > {
> > Py_Initialize();
> >
> > while (1)
> > {
> > char test[100] = {};
> > cout<<">>> ";
> > cin.getline(test, 100);
> > PyRun_SimpleString(test);
> >
> > }
> >
> > Py_Finalize();
> > }
> >
> > for my first tries to embed python in C.
> > However if I try to import pylab (from pylab import *) I get the
following
> > error:
> >
> >>>> from pylab import *
> > Traceback (most recent call last):
> > File "<string>", line 1, in <module>
> > File "C:\Python26\lib\site-packages\pylab.py", line 1, in <module>
> > from matplotlib.pylab import *
> > File "C:\Python26\lib\site-packages\matplotlib\pylab.py", line 206,
in
> > <module>
> > from matplotlib import mpl # pulls in most modules
> > File "C:\Python26\lib\site-packages\matplotlib\mpl.py", line 1, in
> > <module>
> > from matplotlib import artist
> > File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 5,
in
> > <module>
> > from transforms import Bbox, IdentityTransform, TransformedBbox,
> > TransformedPath
> > File "C:\Python26\lib\site-packages\matplotlib\transforms.py", line
34, in
> > <module>
> > from matplotlib._path import affine_transform
> > ImportError: DLL load failed: Eine DLL-Initialisierungsroutine ist
> > fehlgeschlagen.
>
> What version of matplotlib are you using? There were some linker
> problems with 0.98.x similar to the ones you are showing with
> python2.6, but these should be solved with 0.99.x. Also, I wouldn't
> recommend importing pylab or pyplot if you are going to try embedding
> mpl in C. You should use the API -- what you are trying is difficult
> enough w/o dealing with some of the pylab magic like runtime backend
> detection.
I have version 0.99.1 of matplotlib.
With Windows XP and Python 2.6.2
My first thought was also that there might be a linker problem.
|
|
From: John H. <jd...@gm...> - 2009-11-16 14:24:11
|
On Mon, Nov 16, 2009 at 4:12 AM, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 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 logo image is a 40px by 40px PNG, I want it to appear at > that size exactly as it is in the original logo. > > Even if I can't do this directly, I might be able to fudge it if > matplotlib tells me the exact (pixel) dimensions of the plot area — > then I could scale and offset the secondary axes, convert the logo PNG > to RGB values and plot that (or use Python to invoke an imagemagick > subprocess and pass it those numbers... anything, really). > > Is it possible to get this info from matplotlib, or is there a better > way to do this? 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: dpi = 100 # dpi, whatever value you want width, height = 6,4 # in inches, whatever values you want fig = plt.figure(figsize=(width, height), dpi=dpi) pixelw = dpi * width # pixel width of figure pixelh = dpi * height # pixel height of figure # now watermark you figure as in the example linked above, passing the pixel coords of the lower left corner of the image to figimage # this last piece is important: pass dpi to savefig too since mpl supports different dpi for display and hardcopy fig.savefig(myfile, dpi=dpi) JDH |
|
From: John H. <jd...@gm...> - 2009-11-16 14:18:04
|
On Fri, Nov 13, 2009 at 2:24 PM, Christopher Barker <Chr...@no...> wrote: > qu...@gm... 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 can do that? > > This should be support on with any of the GUI toolkits -- I"d pick which > one you want depending on other reasons: > - which one you are familiar with > - which one you're using for other projects > - etc, etc, > > With wx, for instance, you'd put each MPL plot on a wxNoteBook page. For wx, this is illustrated in this example: http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_wx5.html JDH |
|
From: John H. <jd...@gm...> - 2009-11-16 14:14:47
|
On Mon, Nov 16, 2009 at 6:16 AM, <mar...@if...> wrote:
>
> Hello everyone,
>
> I use the following C-Code in visual studio 2005 (I start the program with
> "Release" configuration):
>
> #include <Python.h>
> #include <iostream>
> using namespace std;
>
> void main()
> {
> Py_Initialize();
>
> while (1)
> {
> char test[100] = {};
> cout<<">>> ";
> cin.getline(test, 100);
> PyRun_SimpleString(test);
>
> }
>
> Py_Finalize();
> }
>
> for my first tries to embed python in C.
> However if I try to import pylab (from pylab import *) I get the following
> error:
>
>>>> from pylab import *
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> File "C:\Python26\lib\site-packages\pylab.py", line 1, in <module>
> from matplotlib.pylab import *
> File "C:\Python26\lib\site-packages\matplotlib\pylab.py", line 206, in
> <module>
> from matplotlib import mpl # pulls in most modules
> File "C:\Python26\lib\site-packages\matplotlib\mpl.py", line 1, in
> <module>
> from matplotlib import artist
> File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 5, in
> <module>
> from transforms import Bbox, IdentityTransform, TransformedBbox,
> TransformedPath
> File "C:\Python26\lib\site-packages\matplotlib\transforms.py", line 34, in
> <module>
> from matplotlib._path import affine_transform
> ImportError: DLL load failed: Eine DLL-Initialisierungsroutine ist
> fehlgeschlagen.
What version of matplotlib are you using? There were some linker
problems with 0.98.x similar to the ones you are showing with
python2.6, but these should be solved with 0.99.x. Also, I wouldn't
recommend importing pylab or pyplot if you are going to try embedding
mpl in C. You should use the API -- what you are trying is difficult
enough w/o dealing with some of the pylab magic like runtime backend
detection.
See
http://matplotlib.sourceforge.net/faq/howto_faq.html#matplotlib-in-a-web-application-server
http://matplotlib.sourceforge.net/faq/installing_faq.html#what-is-a-backend
http://matplotlib.sourceforge.net/faq/usage_faq.html#matplotlib-pylab-and-pyplot-how-are-they-related
http://matplotlib.sourceforge.net/users/artists.html
|
|
From: John H. <jd...@gm...> - 2009-11-16 14:10:04
|
On Mon, Nov 16, 2009 at 7:32 AM, Tsviki Hirsh <tsv...@gm...> 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 |
|
From: Tsviki H. <tsv...@gm...> - 2009-11-16 13:53:41
|
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 |
|
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2009-11-16 10:12:31
|
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 exactly as it is in the original logo. Even if I can't do this directly, I might be able to fudge it if matplotlib tells me the exact (pixel) dimensions of the plot area — then I could scale and offset the secondary axes, convert the logo PNG to RGB values and plot that (or use Python to invoke an imagemagick subprocess and pass it those numbers... anything, really). Is it possible to get this info from matplotlib, or is there a better way to do this? Cheers, Jason |