SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(20)
2
(16)
3
(9)
4
(12)
5
(14)
6
(22)
7
(17)
8
(33)
9
(26)
10
(32)
11
(47)
12
(26)
13
(7)
14
(24)
15
(44)
16
(42)
17
(22)
18
(31)
19
(8)
20
(4)
21
(15)
22
(27)
23
(41)
24
(33)
25
(31)
26
(24)
27
(10)
28
(20)






Showing results of 620

<< < 1 .. 15 16 17 18 19 .. 25 > >> (Page 17 of 25)
From: Alan G I. <ala...@gm...> - 2010年02月11日 18:29:14
On 2/11/2010 11:36 AM, Wayne Watson wrote:
> you can more easily see error messages if you open it with IDLE
Why? Just call it from the command line
of a console window that you will leave open.
(Or write the error to file.)
Alan Isaac
From: Wayne W. <sie...@sb...> - 2010年02月11日 18:06:29
Thanks. Got detoured by "not supported". I think I'll be printing our 
your messages in the future. I just went back to one just now, and had 
forgotten about your mentio of pyLab, model.
On 2/11/2010 7:38 AM, John Hunter wrote:
> On Thu, Feb 11, 2010 at 9:18 AM, Wayne Watson
> <sie...@sb...> wrote:
> 
>> Yes, certainly,as you explained a few days ago, the present use is
>> incompatible with idle usage. Further, you mentioned the need for ipython
>> and the "backend" to make it work (in IDLE?). The way we are using problem
>> seems a bit ambiguous, so let me tell what I want the application to do.
>> 
> > From the screenshots, this appears to be a tk app that is being run
> from idle. If you are trying to integrate pyplot with this, it is a
> mode of usage that is *explicitly not supported*. Rather, you should
> embed matplotlib in the app following the embedding_in_tk*.py examples
> at
>
> http://matplotlib.sourceforge.net/examples/user_interfaces/index.html
>
> JDH
>
> 
-- 
"Crime is way down. War is declining. And that's far from the good 
news." -- Steven Pinker (and other sources) Why is this true, but yet 
the media says otherwise? The media knows very well how to manipulate us 
(see limbic, emotion, $$). -- WTW
From: Jae-Joon L. <lee...@gm...> - 2010年02月11日 17:45:25
Or, you may fool the algorithm to find the best location by adding
invisible lines.
For example,
axessubplot4.set_autoscale_on(False)
l1, = axessubplot4.plot([4, 5], [8, 18])
l1.set_visible(False)
axessubplot4.set_autoscale_on(True)
Regards,
-JJ
On Thu, Feb 11, 2010 at 10:58 AM, John Hunter <jd...@gm...> wrote:
> On Thu, Feb 11, 2010 at 9:43 AM, Geoff Bache <geo...@je...> wrote:
>>
>> Hi all,
>>
>> I'm trying to generate graphs from my test results, with regions
>> coloured with succeeded and failing tests. It nearly works, but I have
>> the following problem. I am providing the data with fill_between, which
>> returns PolyCollection objects which cannot be provided to a legend. So
>> I use the "proxy artist" trick, as described here
>>
>> http://matplotlib.sourceforge.net/users/legend_guide.html#plotting-guide-legend
>>
>
> What about creating a proxy artist which is a simple polygon that has
> the same outline as your fill_between polygon?
>
>
> In [539]: t = np.arange(0, 1, 0.05)
>
> In [540]: y = np.sin(2*np.pi*t)
>
> In [541]: verts = zip(t, y)
>
> In [542]: proxy = mpatches.Polygon(verts, facecolor='yellow')
>
> The only reason fill_between uses a PolyCollection is to support the
> "where" keyword argument for non-contiguous fill regions, which you do
> not appear to be using. Thus you could simply create the polygon
> yourself with a little calculation (see mlab.poly_between for a helper
> function) and then just add that patch to the axes rather than using
> fill_between::
>
> t = np.arange(0, 1, 0.05)
> ymin = np.sin(2*np.pi*t)-5
> ymax = np.sin(2*np.pi*t)+5
> xs, ys = mlab.poly_between(t, ymin, ymax)
> verts = zip(xs, ys)
> poly = mpatches.Polygon (verts, facecolor='red', label='my poly')
> ax = subplot(111)
> ax.add_patch(poly)
> ax.legend(loc='best')
> ax.axis([0, 1, -6, 6])
> plt.draw()
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Filipe P. A. F. <oc...@gm...> - 2010年02月11日 17:40:42
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:
newtick = ["-10 ", "-5 ", "0 ", "5 ", "10 "]
pos =[-10, -5, 0, 5, 10]
yticks(pos, newtick)
However I was wondering if there is any automatic way to avoid or fix this
overlap.
Thanks, Filipe
From: Tomasz K. <t.k...@ci...> - 2010年02月11日 17:38:16
I figured now that this was the bottom zero, hence I used other value 
instead. But here we are - there is a conceptual problem with stacked 
bar plots in the log scale - the stacked areas lose their proportions 
and are no longer illustrative.
On 11 Feb 2010, at 17:06, <PH...@Ge...> 
<PH...@Ge...> wrote:
>> -----Original Message-----
>> From: Tomasz Koziara [mailto:t.k...@ci...]
>> Hi
>>
>> I am having a trouble with making a bar plot with log scale enabled.
>> When setting simply log=True in the bar () command, all bars have 
>> junk
>> values of kind 1E-100. When using semilogy () on the other hand, not
>> all stacked bar elements get drawn, plus what is being drawn starts
>> "in the air" above the zero level (attached two eps files).
>>
>> I must be doing the wrong thing, I suppose.
>
> Are you specifying the "bottom" keyword argument?
> -paul h
From: D2Hitman <j.m...@wa...> - 2010年02月11日 17:38:04
Hi,
I was hoping to use mplot3d to visually examine the density of points in a
3D plot. However, the number of points i am displaying is of the order
10,000-100,000. I use scatter or scatter3D to plot x,y,z for the points. The
pan and zoom functions become unworkable.
Does anyone have any bright ideas as to how i could get round this problem?
In 2D, i would use histogram2D and either contour or pcolor to show
densities. Could something similar be done in 3D too?
Thanks,
Jon.
-- 
View this message in context: http://old.nabble.com/mplot3d%3A-large-numbers-scatter-plot-tp27551324p27551324.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jae-Joon L. <lee...@gm...> - 2010年02月11日 17:29:21
You're already using "ax.legend", what kind of OO way do you want?
Instead of calling plt.legend, you may do
 ax.legend([s],[str(i)])
Or, if you know what you're doing, you can do
leg = ax.legend([s],[''], loc=0)
and in the for loop,
 leg.texts[0].set_text(str(i))
Regards,
-JJ
On Thu, Feb 11, 2010 at 5:56 AM, Jorge Scandaliaris
<jor...@ya...> wrote:
> Hi,
> I am re-using a scatter plot in the same figure for interactively displaying
> results without ending up with 30 windows open. The legend is relevant, and so
> it must be also updated. So far the only way I found was to use the set_label()
> method and then using plt.legend(). Is this the only way to get a legend updated
> from a label? I am curious, since generally there is the pyplot way and a more
> OO way of achieving things, but I could't find it this time.
>
> The snippet below shows what I am using right now:
>
> import numpy as np
> import scipy as sp
> import matplotlib as mpl
> import matplotlib.pyplot as plt
>
> data = np.random.randn(3,10)
> fig = plt.figure()
> ax = fig.add_subplot(111)
> s, = ax.plot([])
> ax.axis([0,10,-1,1])
> ax.legend([s],[''], loc=0)
> for i in range(data.shape[0]):
>  s.set_data([np.arange(data.shape[1]),data[i]])
>  s.set_label(str(i))
>  plt.legend()
>  plt.draw()
>  plt.ginput(timeout=0)
>
>
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Wayne W. <sie...@sb...> - 2010年02月11日 16:52:33
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks for the info. I'm semi-resistant to ipython. I tried if for a
few hours, and it seemed a bit too much like linux. Years ago I used
linux a lot, and enjoyed it. I'll consider it. Windows is the game now.<br>
<br>
Yes, actual use is good, but the needed imports seem a bit baffling.
scipy, pylab, matplotlib, ...? What components do I only need for a
particular use?<br>
<br>
The videos you mentioned could be helpful. <br>
<br>
I do not belong to any group, and my small town is a long way from any
educational resources.What I learn is from a few books, FAQs, and
recently the MPL Guide. Within a 50 mile radius, I know exactly one
other person who knows Python. He's a very bright high school student. <br>
<br>
On 2/9/2010 10:33 PM, Gökhan Sever wrote:
<blockquote
 cite="mid:49d...@ma..."
 type="cite"><br>
 <br>
 <div class="gmail_quote">On Tue, Feb 9, 2010 at 8:15 PM, Wayne Watson
 <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:sie...@sb...">sie...@sb...</a>&gt;</span>
wrote:<br>
 <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Subject
is the question.<br>
 <br>
As I see it, it's useful to know MatLab. A simple query with matplotlib<br>
tutorial shows a number of hits. The first, reference to v0.99.a<br>
documentation barely qualifies. Examples galore and a pretty minimal<br>
introduction. In the first 10 or so hits ther's a blog and mention of a<br>
video. The blog may appeal to some, but it seems unelementary. The video<br>
basically asks to sign in. Who knows where that goes? I've seen a few<br>
videos for MPL, but they all look tied into $$.<br>
 <br>
I've made some reasonable progress on MPL, but am still far short of<br>
being confident of using it. Too much try this and see.<br>
 <br>
I know of exactly one book on MPL ( for scientists. sounds interesting).<br>
It was published recently by a foreign author. It is not yet widely<br>
distributed.<br>
 <br>
Your turn. Comments?<br>
 <font color="#888888">--<br>
"Crime is way down. War is declining. And that's far from the good<br>
news." -- Steven Pinker (and other sources) Why is this true, but yet<br>
the media says otherwise? The media knows very well how to manipulate us<br>
(see limbic, emotion, $$). -- WTW<br>
 </font>
 <div>
 <div class="h5"><br>
------------------------------------------------------------------------------<br>
SOLARIS 10 is the OS for Data Centers - provides features such as
DTrace,<br>
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW<br>
 <a moz-do-not-send="true" href="http://p.sf.net/sfu/solaris-dev2dev"
 target="_blank">http://p.sf.net/sfu/solaris-dev2dev</a><br>
_______________________________________________<br>
Matplotlib-users mailing list<br>
 <a moz-do-not-send="true"
 href="mailto:Mat...@li...">Mat...@li...</a><br>
 <a moz-do-not-send="true"
 href="https://lists.sourceforge.net/lists/listinfo/matplotlib-users"
 target="_blank">https://lists.sourceforge.net/lists/listinfo/matplotlib-users</a><br>
 </div>
 </div>
 </blockquote>
 </div>
 <br>
For me best way to learn is to use it actually :) Especially on
homework and projects. Mailing lists are also very helpful as you are
already doing. <br>
 <br>
Try with ipython --pylab option. <br>
 <br>
Also check SciPy09 (<a moz-do-not-send="true"
 href="http://conference.scipy.org/SciPy2009/">http://conference.scipy.org/SciPy2009/</a>)
videos. There are one introductory and advanced tutorials that you can
see online (without registering) or downloading to your computer.<br>
 <br>
 <br clear="all">
 <br>
-- <br>
Gökhan<br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
"Crime is way down. War is declining. And that's far from the good
news." -- Steven Pinker (and other sources)
Why is this true, but yet the media says otherwise? The media
knows very well how to manipulate us (see limbic, emotion, $$). -- WTW</div>
</body>
</html>
From: John H. <jd...@gm...> - 2010年02月11日 16:44:33
On Thu, Feb 11, 2010 at 10:42 AM, Wayne Watson
<sie...@sb...> wrote:
> That link has no reference to tkinter. tk and tk2, plus a few others with
> tk in their names, but nothing else.A search in the box produced nothing.
As I said in my last email, the embedding_in_tk* files are the ones you want.
JDH
From: Wayne W. <sie...@sb...> - 2010年02月11日 16:43:05
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
That link has no reference to tkinter.&nbsp; tk and tk2, plus a few others
with tk in their names, but nothing else.A search in the box produced
nothing.<br>
<br>
On 2/11/2010 8:36 AM, Wayne Watson wrote:
<blockquote cite="mid:4B7...@sb..." type="cite">
 <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
Definitely tkinter. I'll look at the link. Interestingly though, and I
think I mentioned this. There&nbsp; is another plot that's been working
fine. I seldom use it, but when I have, it seems&nbsp; to work. <br>
 <br>
The developer stated this in a msg this morning.<br>
 <font face="Calibri, Verdana, Helvetica, Arial"><span
 style="font-size: 11pt;">Either
way should work. &nbsp;Double clicking the py file is probably more
convenient, but you can more easily see error messages if &nbsp;you open it
with IDLE</span></font><br>
 <br>
On 2/11/2010 7:38 AM, John Hunter wrote:
 <blockquote
 cite="mid:88e...@ma..."
 type="cite">
 <pre wrap="">On Thu, Feb 11, 2010 at 9:18 AM, Wayne Watson
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
 href="mailto:sie...@sb...">&lt;sie...@sb...&gt;</a> wrote:
 </pre>
 <blockquote type="cite">
 <pre wrap="">Yes, certainly,as &nbsp;you explained a few days ago, the present use is
incompatible with idle usage. Further, you mentioned the need for ipython
and the "backend" to make it work (in IDLE?). The way we are using problem
seems a bit ambiguous, so let me tell what I want the application to do.
 </pre>
 </blockquote>
 <pre wrap="">&gt;From the screenshots, this appears to be a tk app that is being run
from idle. If you are trying to integrate pyplot with this, it is a
mode of usage that is *explicitly not supported*. Rather, you should
embed matplotlib in the app following the embedding_in_tk*.py examples
at
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://matplotlib.sourceforge.net/examples/user_interfaces/index.html">http://matplotlib.sourceforge.net/examples/user_interfaces/index.html</a>
JDH
 </pre>
 </blockquote>
 <br>
 <div class="moz-signature">-- <br>
"Crime is way down. War is declining. And that's far from the good
news." -- Steven Pinker (and other sources)
Why is this true, but yet the media says otherwise? The media
knows very well how to manipulate us (see limbic, emotion, $$). -- WTW</div>
 <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
<a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/solaris-dev2dev">http://p.sf.net/sfu/solaris-dev2dev</a></pre>
 <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Matplotlib-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Mat...@li...">Mat...@li...</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/matplotlib-users">https://lists.sourceforge.net/lists/listinfo/matplotlib-users</a>
 </pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
"Crime is way down. War is declining. And that's far from the good
news." -- Steven Pinker (and other sources)
Why is this true, but yet the media says otherwise? The media
knows very well how to manipulate us (see limbic, emotion, $$). -- WTW</div>
</body>
</html>
From: Samuel T. S. <arc...@gm...> - 2010年02月11日 16:39:47
Pierre
You right
look on excel grahic, I found a logarithmic scale option marked
my bad.
really thanks
see ya
2010年2月11日 Samuel Teixeira Santos <arc...@gm...>
> hi again
>
> accuatly, I want redefine my axis points ( it's seems call 'ticks' on
> pyplot, I want redefine his range )
> to be the same as my excel graphic.
>
> I did it's not a logaritmic because to calc thats 'y' points I use another
> formula...
>
> and on Excel it's X Y Scatter Graphic type...
>
> I'm trying now change th xticks and yticks...
>
> thanks :D
>
>
>
> 2010年2月11日 Pierre de Buyl <pd...@ul...>
>
>> Here is what "my" code does. (attached file).
>>
>>
>>
>>> But, There isn't a way to just setting the x,y values' axis easily?
>>>
>> Do you mean the limits of the axes ?
>>
>> Add
>> pp.axis([0.01,10000,0,1])
>> before pp.show()
>>
>>
>> Because isn't a logaritmic (I think)...
>>>
>> the x-axis is logarithmic in model.jpg.
>>
>>
>> And I would like to mantain the same axis coord as in model.jpg, if it's
>>> possible...
>>>
>>> thanks anyway! :D
>>>
>>
>> You're welcome.
>>
>> Pierre
>>
>>
>>
>> 2010年2月11日 Pierre de Buyl <pd...@ul...>
>>> Hello,
>>>
>>> It is not clear what exactly does not work in your file. I assumed it was
>>> the logarithmic scaling in x. Here is the code to produce that.
>>> A complete documentation is available on http://
>>> matplotlib.sourceforge.net/ , you might be especially interested by the
>>> examples http://matplotlib.sf.net/examples/index.html and the gallery
>>> http://matplotlib.sourceforge.net/gallery.html that provide codes to
>>> perform a wide range of graphics.
>>>
>>> Pierre
>>>
>>> from decimal import Decimal
>>> from matplotlib import pyplot as pp
>>>
>>> x = ...
>>> y = ...
>>>
>>> pp.xscale('log')
>>> pp.plot(x,y)
>>> pp.xlabel('h')
>>> pp.ylabel('q')
>>> pp.show()
>>>
>>>
>>> Le 11 févr. 10 à 13:51, Samuel Teixeira Santos a écrit :
>>>
>>> Hi all
>>>
>>> I'm noob on matplotlib on python
>>>
>>> and I need to do excel graphic like (model.jpg) that I send attached.
>>>
>>> I send it too my test code for that
>>>
>>> My problem is to set the values on y and x axis
>>>
>>> how I do it?
>>>
>>> thanks in
>>> advanced<test.py><model.jpg>------------------------------------------------------------------------------
>>> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
>>> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
>>> http://p.sf.net/sfu/solaris-
>>> dev2dev_______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>>
>>>
>>
>>
>>
>
From: Wayne W. <sie...@sb...> - 2010年02月11日 16:36:25
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Definitely tkinter. I'll look at the link. Interestingly though, and I
think I mentioned this. There&nbsp; is another plot that's been working
fine. I seldom use it, but when I have, it seems&nbsp; to work. <br>
<br>
The developer stated this in a msg this morning.<br>
<font face="Calibri, Verdana, Helvetica, Arial"><span
 style="font-size: 11pt;">Either
way should work. &nbsp;Double clicking the py file is probably more
convenient, but you can more easily see error messages if &nbsp;you open it
with IDLE</span></font><br>
<br>
On 2/11/2010 7:38 AM, John Hunter wrote:
<blockquote
 cite="mid:88e...@ma..."
 type="cite">
 <pre wrap="">On Thu, Feb 11, 2010 at 9:18 AM, Wayne Watson
<a class="moz-txt-link-rfc2396E" href="mailto:sie...@sb...">&lt;sie...@sb...&gt;</a> wrote:
 </pre>
 <blockquote type="cite">
 <pre wrap="">Yes, certainly,as &nbsp;you explained a few days ago, the present use is
incompatible with idle usage. Further, you mentioned the need for ipython
and the "backend" to make it work (in IDLE?). The way we are using problem
seems a bit ambiguous, so let me tell what I want the application to do.
 </pre>
 </blockquote>
 <pre wrap="">
&gt;From the screenshots, this appears to be a tk app that is being run
from idle. If you are trying to integrate pyplot with this, it is a
mode of usage that is *explicitly not supported*. Rather, you should
embed matplotlib in the app following the embedding_in_tk*.py examples
at
<a class="moz-txt-link-freetext" href="http://matplotlib.sourceforge.net/examples/user_interfaces/index.html">http://matplotlib.sourceforge.net/examples/user_interfaces/index.html</a>
JDH
 </pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
"Crime is way down. War is declining. And that's far from the good
news." -- Steven Pinker (and other sources)
Why is this true, but yet the media says otherwise? The media
knows very well how to manipulate us (see limbic, emotion, $$). -- WTW</div>
</body>
</html>
From: Samuel T. S. <arc...@gm...> - 2010年02月11日 16:09:01
hi again
accuatly, I want redefine my axis points ( it's seems call 'ticks' on
pyplot, I want redefine his range )
to be the same as my excel graphic.
I did it's not a logaritmic because to calc thats 'y' points I use another
formula...
and on Excel it's X Y Scatter Graphic type...
I'm trying now change th xticks and yticks...
thanks :D
2010年2月11日 Pierre de Buyl <pd...@ul...>
> Here is what "my" code does. (attached file).
>
>
>
>> But, There isn't a way to just setting the x,y values' axis easily?
>>
> Do you mean the limits of the axes ?
>
> Add
> pp.axis([0.01,10000,0,1])
> before pp.show()
>
> Because isn't a logaritmic (I think)...
>>
> the x-axis is logarithmic in model.jpg.
>
> And I would like to mantain the same axis coord as in model.jpg, if it's
>> possible...
>>
>> thanks anyway! :D
>>
>
> You're welcome.
>
> Pierre
>
>
> 2010年2月11日 Pierre de Buyl <pd...@ul...>
>> Hello,
>>
>> It is not clear what exactly does not work in your file. I assumed it was
>> the logarithmic scaling in x. Here is the code to produce that.
>> A complete documentation is available on http://
>> matplotlib.sourceforge.net/ , you might be especially interested by the
>> examples http://matplotlib.sf.net/examples/index.html and the gallery
>> http://matplotlib.sourceforge.net/gallery.html that provide codes to
>> perform a wide range of graphics.
>>
>> Pierre
>>
>> from decimal import Decimal
>> from matplotlib import pyplot as pp
>>
>> x = ...
>> y = ...
>>
>> pp.xscale('log')
>> pp.plot(x,y)
>> pp.xlabel('h')
>> pp.ylabel('q')
>> pp.show()
>>
>>
>> Le 11 févr. 10 à 13:51, Samuel Teixeira Santos a écrit :
>>
>> Hi all
>>
>> I'm noob on matplotlib on python
>>
>> and I need to do excel graphic like (model.jpg) that I send attached.
>>
>> I send it too my test code for that
>>
>> My problem is to set the values on y and x axis
>>
>> how I do it?
>>
>> thanks in
>> advanced<test.py><model.jpg>------------------------------------------------------------------------------
>> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
>> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
>> http://p.sf.net/sfu/solaris-
>> dev2dev_______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>>
>
>
>
From: John H. <jd...@gm...> - 2010年02月11日 15:58:40
On Thu, Feb 11, 2010 at 9:43 AM, Geoff Bache <geo...@je...> wrote:
>
> Hi all,
>
> I'm trying to generate graphs from my test results, with regions
> coloured with succeeded and failing tests. It nearly works, but I have
> the following problem. I am providing the data with fill_between, which
> returns PolyCollection objects which cannot be provided to a legend. So
> I use the "proxy artist" trick, as described here
>
> http://matplotlib.sourceforge.net/users/legend_guide.html#plotting-guide-legend
>
What about creating a proxy artist which is a simple polygon that has
the same outline as your fill_between polygon?
In [539]: t = np.arange(0, 1, 0.05)
In [540]: y = np.sin(2*np.pi*t)
In [541]: verts = zip(t, y)
In [542]: proxy = mpatches.Polygon(verts, facecolor='yellow')
The only reason fill_between uses a PolyCollection is to support the
"where" keyword argument for non-contiguous fill regions, which you do
not appear to be using. Thus you could simply create the polygon
yourself with a little calculation (see mlab.poly_between for a helper
function) and then just add that patch to the axes rather than using
fill_between::
 t = np.arange(0, 1, 0.05)
 ymin = np.sin(2*np.pi*t)-5
 ymax = np.sin(2*np.pi*t)+5
 xs, ys = mlab.poly_between(t, ymin, ymax)
 verts = zip(xs, ys)
 poly = mpatches.Polygon (verts, facecolor='red', label='my poly')
 ax = subplot(111)
 ax.add_patch(poly)
 ax.legend(loc='best')
 ax.axis([0, 1, -6, 6])
 plt.draw()
From: Geoff B. <geo...@je...> - 2010年02月11日 15:44:02
Hi all,
I'm trying to generate graphs from my test results, with regions 
coloured with succeeded and failing tests. It nearly works, but I have 
the following problem. I am providing the data with fill_between, which 
returns PolyCollection objects which cannot be provided to a legend. So 
I use the "proxy artist" trick, as described here
http://matplotlib.sourceforge.net/users/legend_guide.html#plotting-guide-legend
The problem is that my legend then gets placed over the graph. As it has 
been generated from proxy artists, it presumably doesn't take account of 
the real artists when deciding where to place itself.
I tried plotting lines as well as filling regions (commented lines in 
the code below) which works for the legend placement but leaves an ugly 
red line inside the green region, where presumably it is trying to show 
me that it's plotted a line.
As I in general have no idea what the data will look like I believe I 
need to use the "best" placement for the legend, I cannot hardcode it.
Any advice greatly appreciated. I paste below exactly what my program 
does (this is autogenerated from my real program).
Regards,
Geoff Bache
#!/usr/bin/env python
import pylab
pylab.clf()
figure4 = pylab.figure(1)
figure4.set_figwidth(9.4488188976377945)
figure4.set_figheight(7.8740157480314963)
axessubplot4 = pylab.subplot(111)
text4 = pylab.title("Test results for Application: 'Application One' 
Version: 'version2'", fontsize=10, family='monospace')
#axessubplot4.plot([0, 1, 2, 3, 4, 5], [2, 2, 2, 8, 8, 15], 
color='#CEEFBD', linewidth=2, linestyle='-', label='Succeeded tests')
#axessubplot4.plot([1, 2, 3], [2, 4, 8], color='#FF3118', linewidth=2, 
linestyle='-', label='Failed tests')
#axessubplot4.plot([4, 5], [8, 18], color='#FF3118', linewidth=2, 
linestyle='-', label='Failed tests')
axessubplot4.fill_between([0, 1, 2, 3, 4, 5], [0, 0, 0, 0, 0, 0], [2, 2, 
2, 8, 8, 15], color='#CEEFBD', linewidth=2, linestyle='-')
axessubplot4.fill_between([1, 2, 3], [2, 2, 8], [2, 4, 8], 
color='#FF3118', linewidth=2, linestyle='-')
axessubplot4.fill_between([4, 5], [8, 15], [8, 18], color='#FF3118', 
linewidth=2, linestyle='-')
pylab.xticks([0, 1, 2, 3, 4, 5], ['14Jan2006', '15Jan2006', '16Jan2006', 
'17Jan2006', '18Jan2006', '19Jan2006'])
silent_list8 = axessubplot4.get_xticklabels()
pylab.setp(silent_list8, 'rotation', 90, fontsize=7)
p = pylab.Rectangle((0, 0), 1, 1, fc="#FF3118")
p2 = pylab.Rectangle((0, 0), 1, 1, fc="#CEEFBD")
legend4 = axessubplot4.legend([ p, p2 ], ('Failed tests', 'Succeeded 
tests'), 'best', shadow=False)
fancybboxpatch4 = legend4.get_frame()
fancybboxpatch4.set_alpha(0.5)
figure4.subplots_adjust(bottom=0.25)
figure4.savefig('results.app1.version2.png', dpi=100)
From: John H. <jd...@gm...> - 2010年02月11日 15:38:57
On Thu, Feb 11, 2010 at 9:18 AM, Wayne Watson
<sie...@sb...> wrote:
> Yes, certainly,as you explained a few days ago, the present use is
> incompatible with idle usage. Further, you mentioned the need for ipython
> and the "backend" to make it work (in IDLE?). The way we are using problem
> seems a bit ambiguous, so let me tell what I want the application to do.
>From the screenshots, this appears to be a tk app that is being run
from idle. If you are trying to integrate pyplot with this, it is a
mode of usage that is *explicitly not supported*. Rather, you should
embed matplotlib in the app following the embedding_in_tk*.py examples
at
http://matplotlib.sourceforge.net/examples/user_interfaces/index.html
JDH
From: Wayne W. <sie...@sb...> - 2010年02月11日 15:20:44
Yes, certainly,as you explained a few days ago, the present use is 
incompatible with idle usage. Further, you mentioned the need for 
ipython and the "backend" to make it work (in IDLE?). The way we are 
using problem seems a bit ambiguous, so let me tell what I want the 
application to do.
Overall, the software,in Python 2.5 for Win and some i/f to hw/w, 
provides the mechanism to capture fireballs, bright meteors, with a 
video camera. The software is mostly about the camera. When to turn it 
on/off for the night, etc. There is only one minimal analytic 
capability, which uses MPL to produce a brightness curve for a meteor.
 During the day, a station operator examines the take for the night by 
successively moving from meteor event to another via software buttons. 
As this is done, the video of the meteor appears on the screen. Someone 
else, probably a summer student, put the brigthness curve in a few years 
ago. I have a station and have been perplexed as to why more analytic 
capability than that has never been supplied. Having some past 
experience with software, I decided to put in a new analytic capability.
It is supposed to do this. For each video the user sees, I want to 
generate statistics on the meteor track, and a plot (MPL style) showing 
the track across a 640x480 area. Not the meteor itself, but the centroid 
of tracks along the path. Both the stats and plot work, except for one 
thing. When show(), say in def do_track_stats, is executed the plot 
appears,but does not return to the statement after the call from which 
the plot def, call it def setup_trks, was called. As a consequence, the 
calling def setup_trks does not bump ahead to the next video,which is 
the next thing it should do. The first image shown remains on the 
display screen. The stats for the video do get calculated properly and 
displayed in the shell script. That's the (software) problem, the video 
never changes. As I think I discovered with the debugger, after show() 
finishes, the program goes to the start of setup_trks.
Fortunately, I have access to the fellow to originally developed this 
application. I will write him shortly and ask him if he has another way 
to use and execute the program. I have not one single idea why it 
operates this way. Well, perhaps. When I talked to him several years ago 
about modifying some of the code, and asked for advice on an 
interpreter, he said he only has experience with IDLE, so in my work, 
which is pretty much independent now of his, I 've stuck with it. In the 
last five years I've seen this app go from C (Linux) to Windows + Linux 
to sometime this year to C++. They've been taking advantage of newly 
developed capture cards. Although I used to know C++ very well, I'm not 
going there. Now that I've invested a good bit of time in Python, I'm 
sticking with it. I can write all the analytic code I need by 
understanding whatever the data files the C++ might produce. Basically, 
it's just a tool to shoot videos. The original developer does really 
produce good code in each of these instances, but it is undocumented, 
and has been problematic sometimes, especially with the h/w hooks in 
it. I do talk to the fellow pretty regularly, but about new ideas for 
the C++ s/w. The new camera capabilities are pretty impressive.
I'm going to attach I made for another follower of my trials and 
tribulations. They may not help,but might. The red lines show which 
windows are active for the app. Other windows just happen to be in use 
for other purposes. Note a wagon wheel is shown where the meteor video 
goes. It's the first thing in the window, but never changes, as the 
bump to next doesn't work,as above.
There are other i/f issues, but, another time, to do with the shell window.
On 2/11/2010 3:24 AM, John Hunter wrote:
> On Thu, Feb 11, 2010 at 2:41 AM, Wayne Watson
> <sie...@sb...> wrote:
>
>> A Ground Hog movie moment? Deja vu all over again (Quoting Yega Berra.).
>>
>> I went right through John Hunter's comment of a day or two ago about the
>> need to solve this with ipython. That has to be taken into
>> consideration; otherwise, this is a no-go..
>>
> Instead of focusing on "show", you should describe the problem you are
> trying to solve. From previous posts, it sounds like you are trying
> to use pyplot in a mode is was not designed to handle. You said you
> are delivering a python application that uses matplotlib to users who
> do not know python, and using Idle to run the app. Why? Why use idle
> in an app for users who do not know python since it is a python IDE.
> You also said that this was not your design decision and so it sounds
> like you are working on code someone else developed so you may be
> suffering from someone else's bad design decisions.
>
> My guess is you would have much more success embedding matplotlib in a
> GUI toolkit of your choice and then you have complete control over the
> mainloop, the threading, how and when windows are raised in what
> order.
>
> http://matplotlib.sourceforge.net/examples/user_interfaces/index.html
>
> "show" is meant to be the last line of a script and raise all of the
> figures generated in that script at once. interactive mode including
> ipython in pylab mode is meant for python coders who want to create
> and modify figures typing python code at the interactive shell prompt.
> User interface embedding is for developers who want to deploy mpl in
> an application to users who may or may not know python where the
> developer wants complete control of figure and window management --
> this sounds like your use case. Trying to shoehorn one mode into
> another will lead to frustration.
>
> Writing user interface applications can be hard and tedious (though
> there are tools like enthought traits to make it less so). pyplot is
> technically a user interface application which is a scripting language
> to make figures. Because it is easy, some people who want to write
> more complex applications only using pyplot and this can be done up to
> a point with judicious use of event handling and GUI idle handlers,
> etc (see http://matplotlib.sourceforge.net/users/event_handling.html).
> But at some point you will hit the wall because you are trying to
> make pyplot do something it is not designed to do, but don't blame
> pyplot (or pyplot.show). matplotlib is readily usable in complex user
> interface applications -- in fact that is what it was designed for --
> and pyplot is just an interface sitting on top of that, but you must
> use the matplotlib API and directly embed the matplotlib canvas and
> toolbar in your application to reach this potential.
>
> JDH
>
>
-- 
"Crime is way down. War is declining. And that's far from the good 
news." -- Steven Pinker (and other sources) Why is this true, but yet 
the media says otherwise? The media knows very well how to manipulate us 
(see limbic, emotion, $$). -- WTW
From: John H. <jd...@gm...> - 2010年02月11日 14:20:00
On Thu, Feb 11, 2010 at 8:13 AM, Lee Boger <Bog...@ca...> wrote:
>
> I think he wants to turn the grid on for both major and minor ticks. I'm
> interested in that also. Is there a way to do that?
>
>
ax.grid(True, which='major')
ax.grid(True, which='minor')
JDH
From: Pierre de B. <pd...@ul...> - 2010年02月11日 14:16:49
Hello,
It is not clear what exactly does not work in your file. I assumed it 
was the logarithmic scaling in x. Here is the code to produce that.
A complete documentation is available on http:// 
matplotlib.sourceforge.net/ , you might be especially interested by 
the examples http://matplotlib.sf.net/examples/index.html and the 
gallery http://matplotlib.sourceforge.net/gallery.html that provide 
codes to perform a wide range of graphics.
Pierre
from decimal import Decimal
from matplotlib import pyplot as pp
x = ...
y = ...
pp.xscale('log')
pp.plot(x,y)
pp.xlabel('h')
pp.ylabel('q')
pp.show()
Le 11 févr. 10 à 13:51, Samuel Teixeira Santos a écrit :
> Hi all
>
> I'm noob on matplotlib on python
>
> and I need to do excel graphic like (model.jpg) that I send attached.
>
> I send it too my test code for that
>
> My problem is to set the values on y and x axis
>
> how I do it?
>
> thanks in 
> advanced<test.py><model.jpg>------------------------------------------ 
> ------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as 
> DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris- 
> dev2dev_______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Lee B. <Bog...@ca...> - 2010年02月11日 14:13:25
I think he wants to turn the grid on for both major and minor ticks. I'm 
interested in that also. Is there a way to do that?
Lee
Jae-Joon Lee <lee...@gm...> 
02/10/2010 08:10 PM
To
K L <kl...@gm...>
cc
mat...@li...
Subject
Re: [Matplotlib-users] logarithmic plotting and the grid
Caterpillar: Confidential Green Retain Until: 03/12/2010 
grid takes an optional argument "which". Unfortunately this is not
properly documented with pylab.grid and Axes.grid.
But see
http://matplotlib.sourceforge.net/api/axis_api.html?highlight=grid#matplotlib.axis.Axis.grid
grid(True) # this turns on gridlines for major ticks
grid(True, which="minor") # this turns on gridlines for minor ticks.
-JJ
On Wed, Feb 10, 2010 at 6:18 PM, K L <kl...@gm...> wrote:
> Hi,
>
> I want a more "detailed" grid for my logarithmic plotting. The following 
code:
>
> from pylab import *
> semilogy(range(100000))
> grid(True)
> show()
>
> will produce output like this: http://i49.tinypic.com/2dpd3r.png
>
> Notice that the grid uniformly slices the image. And some ticks on the
> y-axis doesn't have grid lines. This is not want I want.
>
> Conversely, something like this is preferred:
>
> 
http://www.mathworks.com/access/helpdesk/help/toolbox/comm/ug/bert_mat_explot1.gif
>
> Thanks!
>
> 
------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as 
DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Samuel T. S. <arc...@gm...> - 2010年02月11日 12:59:55
Attachments: model.jpg
# -*- coding: utf-8 -*-
from decimal import Decimal
y=[Decimal('0.3041997084285048793446312110'), Decimal('0.3041811120982812429734672735'), Decimal('0.3041586008929715390350375366'), Decimal('0.3041326478700651884918449742'), Decimal('0.3041035792459110687414956042'), Decimal('0.3040716389305317969883516979'), Decimal('0.3040370190056943726355391828'), Decimal('0.3039998763354236109640693846'), Decimal('0.3039603425231051434729103751'), Decimal('0.3039185303035350714640090501'), Decimal('0.3038745378649594754802712117'), Decimal('0.3038284518931050349228492634'), Decimal('0.3037303013157358388145146537'), Decimal('0.3036783698876388202495693043'), Decimal('0.3036246135388058002644503367'), Decimal('0.3035690857187649546055776374'), Decimal('0.3035118359225733232985072989'), Decimal('0.3034529102064387430820630960'), Decimal('0.3027798308296002483823593898'), Decimal('0.3019747799126658047321072371'), Decimal('0.3010595626751769086882851904'), Decimal('0.3000504843910340202763428443'), Decimal('0.2989606698104426040434113406'), Decimal('0.2978011455914110301509835818'), Decimal('0.2965814242208845926010044833'), Decimal('0.2953098521515828700938805931'), Decimal('0.2939938339016535952485540052'), Decimal('0.2926399857027685846714651451'), Decimal('0.2912542467050261664773915582'), Decimal('0.2898419633541847137900856664'), Decimal('0.2884079560914847679054444372'), Decimal('0.2869565739529259676416421710'), Decimal('0.2854917405773616724446679145'), Decimal('0.2840169938920561838932972437'), Decimal('0.2825355209776950316856977412'), Decimal('0.2810501891298752300565699492'), Decimal('0.2530398800717247021535893133'), Decimal('0.2309593282901911270323471566'), Decimal('0.2142248288114558358413671724'), Decimal('0.2013198591032495347111055987'), Decimal('0.1911048080932635279916693404'), Decimal('0.1828168101439619902156148570'), Decimal('0.1759472033051957360143949273'), Decimal('0.1701494956228995244136332946'), Decimal('0.1651812738049817427569102300'), Decimal('0.1480327912592802041987336541'), Decimal('0.1377158741268375390344888336'), Decimal('0.1306910617724526170054856744'), Decimal('0.1255330889933308327695803461'), Decimal('0.1215487905337388255028562821'), Decimal('0.1183569033660768681595931242'), Decimal('0.1157287111457510779727799369'), Decimal('0.1135178566558123755075563813'), Decimal('0.1116258850568561542189771708'), Decimal('0.1099838725178337221454044654'), Decimal('0.1085419726700384590105347580'), Decimal('0.1072631467404932434072879819'), Decimal('0.1061192356086297651474504552'), Decimal('0.1050884072158080865363934958'), Decimal('0.1043334716140861254810893687'), Decimal('0.1033005693930824423996036004'), Decimal('0.1025186055369403393962066223'), Decimal('0.1017983854707960971280910413'), Decimal('0.09940010650120277239400512213'), Decimal('0.09755584274949988113748876745'), Decimal('0.09608280592970019748916863039'), Decimal('0.09487248638771297021511871199'), Decimal('0.09385595137090260551637864016'), Decimal('0.09298707461257284768573005693'), Decimal('0.09223369403246902869720064622'), Decimal('0.09157262184937054787957562771'), Decimal('0.09098667068685246134841009967'), Decimal('0.09046279979357594355255331919'), Decimal('0.08999091520111926307741922487'), Decimal('0.08956306789557021895282081016'), Decimal('0.08917290300510101286609973635'), Decimal('0.08881527223605659165755623012'), Decimal('0.08839214273205423057465385692'), Decimal('0.08818145632861301828547916695'), Decimal('0.08789885141864609564589281926'), Decimal('0.08763567457015281090584469616'), Decimal('0.08738982949516953082784067755'), Decimal('0.08715952155240858367614678101'), Decimal('0.08694320432541564991702617169'), Decimal('0.08673953730326870462655463881'), Decimal('0.08654735203979727709035602654'), Decimal('0.08636562485710431638877620200'), Decimal('0.08619345465056452099941506608'), Decimal('0.08603004470711568574821284350'), Decimal('0.08587468770771509864601566552'), Decimal('0.08572675327619531920987689779'), Decimal('0.08558567757959197545385559924'), Decimal('0.08545095459267629930008504016'), Decimal('0.08532212872131176389071802292'), Decimal('0.08519878854207047655135178819'), Decimal('0.08508056146411939254364355471'), Decimal('0.08496710915723189654691208846'), Decimal('0.08485812361947675422749917393'), Decimal('0.08475332378159534560914071150'), Decimal('0.08465245256372754764842491632'), Decimal('0.08455527431506202470084773481'), Decimal('0.08446157257898387425834816114'), Decimal('0.08437114813599492559990198572'), Decimal('0.08428381728456899879544582613'), Decimal('0.08419941032654730116548635256'), Decimal('0.08411777022896698490334200456'), Decimal('0.08403875143857520858918587966'), Decimal('0.08396221882889025972553278686'), Decimal('0.08386262232372649278629223114'), Decimal('0.08361273883882196959916333934'), Decimal('0.08345608379673519958423317571'), Decimal('0.08330974744282251919370920665'), Decimal('0.08317266107334228418049993152'), Decimal('0.08304390383855027008163486326'), Decimal('0.08292267752867770304037472628'), Decimal('0.08280828641286421725419676540'), Decimal('0.08270012097797205558855339636'), Decimal('0.08256793883349254633032840545'), Decimal('0.08255838341506859117962741714')]
x=[Decimal('0.010000000000'), Decimal('0.015000000000'), Decimal('0.020000000000'), Decimal('0.025000000000'), Decimal('0.030000000000'), Decimal('0.035000000000'), Decimal('0.040000000000'), Decimal('0.045000000000'), Decimal('0.050000000000'), Decimal('0.055000000000'), Decimal('0.060000000000'), Decimal('0.065000000000'), Decimal('0.075000000000'), Decimal('0.080000000000'), Decimal('0.085000000000'), Decimal('0.090000000000'), Decimal('0.095000000000'), Decimal('0.100000000000'), Decimal('0.150000000000'), Decimal('0.200000000000'), Decimal('0.250000000000'), Decimal('0.300000000000'), Decimal('0.350000000000'), Decimal('0.400000000000'), Decimal('0.450000000000'), Decimal('0.500000000000'), Decimal('0.550000000000'), Decimal('0.600000000000'), Decimal('0.650000000000'), Decimal('0.700000000000'), Decimal('0.750000000000'), Decimal('0.800000000000'), Decimal('0.850000000000'), Decimal('0.900000000000'), Decimal('0.950000000000'), Decimal('1.000000000000'), Decimal('2.000000000000'), Decimal('3.000000000000'), Decimal('4.000000000000'), Decimal('5.000000000000'), Decimal('6.000000000000'), Decimal('7.000000000000'), Decimal('8.000000000000'), Decimal('9.000000000000'), Decimal('10.000000000000'), Decimal('15.000000000000'), Decimal('20.000000000000'), Decimal('25.000000000000'), Decimal('30.000000000000'), Decimal('35.000000000000'), Decimal('40.000000000000'), Decimal('45.000000000000'), Decimal('50.000000000000'), Decimal('55.000000000000'), Decimal('60.000000000000'), Decimal('65.000000000000'), Decimal('70.000000000000'), Decimal('75.000000000000'), Decimal('80.000000000000'), Decimal('84.000000000000'), Decimal('90.000000000000'), Decimal('95.000000000000'), Decimal('100.000000000000'), Decimal('120.000000000000'), Decimal('140.000000000000'), Decimal('160.000000000000'), Decimal('180.000000000000'), Decimal('200.000000000000'), Decimal('220.000000000000'), Decimal('240.000000000000'), Decimal('260.000000000000'), Decimal('280.000000000000'), Decimal('300.000000000000'), Decimal('320.000000000000'), Decimal('340.000000000000'), Decimal('360.000000000000'), Decimal('380.000000000000'), Decimal('406.000000000000'), Decimal('420.000000000000'), Decimal('440.000000000000'), Decimal('460.000000000000'), Decimal('480.000000000000'), Decimal('500.000000000000'), Decimal('520.000000000000'), Decimal('540.000000000000'), Decimal('560.000000000000'), Decimal('580.000000000000'), Decimal('600.000000000000'), Decimal('620.000000000000'), Decimal('640.000000000000'), Decimal('660.000000000000'), Decimal('680.000000000000'), Decimal('700.000000000000'), Decimal('720.000000000000'), Decimal('740.000000000000'), Decimal('760.000000000000'), Decimal('780.000000000000'), Decimal('800.000000000000'), Decimal('820.000000000000'), Decimal('840.000000000000'), Decimal('860.000000000000'), Decimal('880.000000000000'), Decimal('900.000000000000'), Decimal('920.000000000000'), Decimal('940.000000000000'), Decimal('960.000000000000'), Decimal('980.000000000000'), Decimal('1000.000000000000'), Decimal('1027.000000000000'), Decimal('1100.000000000000'), Decimal('1150.000000000000'), Decimal('1200.000000000000'), Decimal('1250.000000000000'), Decimal('1300.000000000000'), Decimal('1350.000000000000'), Decimal('1400.000000000000'), Decimal('1450.000000000000'), Decimal('1515.000000000000'), Decimal('1519.875000000000')]
from matplotlib import pyplot as pp
pp.plot(x,y)
pp.xlabel('h')
pp.ylabel('q')
pp.show()
From: Tomasz K. <t.k...@ci...> - 2010年02月11日 12:05:23
Attachments: one.eps two.eps
Hi
I am having a trouble with making a bar plot with log scale enabled. 
When setting simply log=True in the bar () command, all bars have junk 
values of kind 1E-100. When using semilogy () on the other hand, not 
all stacked bar elements get drawn, plus what is being drawn starts 
"in the air" above the zero level (attached two eps files).
I must be doing the wrong thing, I suppose.
Regards
Tomek
From: John H. <jd...@gm...> - 2010年02月11日 11:24:20
On Thu, Feb 11, 2010 at 2:41 AM, Wayne Watson
<sie...@sb...> wrote:
> A Ground Hog movie moment? Deja vu all over again (Quoting Yega Berra.).
>
> I went right through John Hunter's comment of a day or two ago about the
> need to solve this with ipython. That has to be taken into
> consideration; otherwise, this is a no-go..
Instead of focusing on "show", you should describe the problem you are
trying to solve. From previous posts, it sounds like you are trying
to use pyplot in a mode is was not designed to handle. You said you
are delivering a python application that uses matplotlib to users who
do not know python, and using Idle to run the app. Why? Why use idle
in an app for users who do not know python since it is a python IDE.
You also said that this was not your design decision and so it sounds
like you are working on code someone else developed so you may be
suffering from someone else's bad design decisions.
My guess is you would have much more success embedding matplotlib in a
GUI toolkit of your choice and then you have complete control over the
mainloop, the threading, how and when windows are raised in what
order.
http://matplotlib.sourceforge.net/examples/user_interfaces/index.html
"show" is meant to be the last line of a script and raise all of the
figures generated in that script at once. interactive mode including
ipython in pylab mode is meant for python coders who want to create
and modify figures typing python code at the interactive shell prompt.
 User interface embedding is for developers who want to deploy mpl in
an application to users who may or may not know python where the
developer wants complete control of figure and window management --
this sounds like your use case. Trying to shoehorn one mode into
another will lead to frustration.
Writing user interface applications can be hard and tedious (though
there are tools like enthought traits to make it less so). pyplot is
technically a user interface application which is a scripting language
to make figures. Because it is easy, some people who want to write
more complex applications only using pyplot and this can be done up to
a point with judicious use of event handling and GUI idle handlers,
etc (see http://matplotlib.sourceforge.net/users/event_handling.html).
 But at some point you will hit the wall because you are trying to
make pyplot do something it is not designed to do, but don't blame
pyplot (or pyplot.show). matplotlib is readily usable in complex user
interface applications -- in fact that is what it was designed for --
and pyplot is just an interface sitting on top of that, but you must
use the matplotlib API and directly embed the matplotlib canvas and
toolbar in your application to reach this potential.
JDH
From: Jorge S. <jor...@ya...> - 2010年02月11日 10:57:23
Hi,
I am re-using a scatter plot in the same figure for interactively displaying
results without ending up with 30 windows open. The legend is relevant, and so
it must be also updated. So far the only way I found was to use the set_label()
method and then using plt.legend(). Is this the only way to get a legend updated
from a label? I am curious, since generally there is the pyplot way and a more
OO way of achieving things, but I could't find it this time.
The snippet below shows what I am using right now:
import numpy as np
import scipy as sp
import matplotlib as mpl
import matplotlib.pyplot as plt
data = np.random.randn(3,10) 
fig = plt.figure()
ax = fig.add_subplot(111)
s, = ax.plot([])
ax.axis([0,10,-1,1])
ax.legend([s],[''], loc=0)
for i in range(data.shape[0]):
 s.set_data([np.arange(data.shape[1]),data[i]])
 s.set_label(str(i))
 plt.legend()
 plt.draw()
 plt.ginput(timeout=0)
From: Wayne W. <sie...@sb...> - 2010年02月11日 08:41:42
A Ground Hog movie moment? Deja vu all over again (Quoting Yega Berra.).
I went right through John Hunter's comment of a day or two ago about the 
need to solve this with ipython. That has to be taken into 
consideration; otherwise, this is a no-go..
I suppose an interesting aside though on what I discovered through the 
debugger. When the program hit show(), it went back to the first line in 
the calling def instead of after where it was called. I suppose in some 
dim way one could use a global variable to detect that occurrence, and 
remedy matters. I'll defer to ipython.
On 2/10/2010 7:08 PM, Wayne Watson wrote:
> Foiled again. I clicked on the previous version, which has no MPL code
> in the same def.
> The show() is where things go wrong though. The question now is where
> did the program go after the show()? Maybe it's time to put the
> interactive debugger into play, which I've barely used. I have used others.
>
> On 2/10/2010 6:44 PM, Wayne Watson wrote:
> 
>> I chronicled some of my MPL problems here. It appeared that show()
>> could be the problem. The problem is apparently the difference between
>> running the program in IDLE and executing it from the folder (Maybe
>> there's a name for that?). There are only about 8 lines of MPL code to
>> the show() in a def. I inserted and moved a return down each line,
>> executing the program afterwords. It behaved as expected, no plot.
>> Once I removed the plot, I got the unexpected behavior. A video clip
>> not played. So off to a direct py file execution. It worked fully.
>>
>> What this amounts to is that we need to find a better way for users to
>> execute the program than through IDLE. Tomorrow I'll pass this by the
>> original developer.
>> 
> 
-- 
"Crime is way down. War is declining. And that's far from the good 
news." -- Steven Pinker (and other sources) Why is this true, but yet 
the media says otherwise? The media knows very well how to manipulate us 
(see limbic, emotion, $$). -- WTW
37 messages has been excluded from this view by a project administrator.

Showing results of 620

<< < 1 .. 15 16 17 18 19 .. 25 > >> (Page 17 of 25)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /