Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-15 Thread Tim Michelsen
Hello,
I have a similar problem to:
 Suppose I plot a line from (0,0) to (1,1.5) to (2,2). Now I want to mark 
 (1,1.5) with a green circle. How is that done?

I am performing a curve fit and also showing a distribution in my plot.
In order to help the reader to evaluate the result I would like to draw certain
boundaries (vertical and horizontal line).
While I am aware on how to draw such lines, I would like to know wheather there
are some functions in matplotlib which help me to retrieve the coordinates

a) at which two curves intersect
b) at which a distribution reaches a certain value?

Example:
How do I get the y-axis value which is reached by the green curve in 
http://matplotlib.sourceforge.net/_images/histogram_demo_extended_021.png
a x-axis value of in 175?

I could proably use a solver from numpy like
http://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.solve.html#numpy.linalg.solve
but if I plot a distribution, the equation of the envelove is unknown at the
first place.

I'd appreciate your help or pointers to examples.

Thanks a lot in advance,
Timmie



--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-15 Thread Wayne Watson
Hi, Phillip. don't know why the mail would be returned. The address I 
see above is correct. sierra_mtni...@sbcglobal.net. The only thing I can 
think of is that yahoo mail wanted you to allow you to ask for 
permission. Beats me.

Frankly, I've never really liked the reply format of mail lists. I use 
Thunderbird on Win. Sometimes I see messages in my inbox from someone 
and wonder are they trying for a private comm or just sending me a 
courtesy msg so that I should follow up on the list.  Then there's Reply 
vs Reply All, and some filter  problems. The latter can produce what I 
call the boomerang effect. Mail intended for me goes right into the list 
folder. There are goblins out there. :-)

To me all this can be solved by one word, Forum. Not a mail list. Aside 
from the possible cost (to the Python Org?), comm is much clearer on 
them.  Perhaps one disadvantage is that some people apparently have some 
bizarre form of e-mail that is not suitable for them.   Otherwise, I 
have no idea why they are not more often used.

html not allowed? The rules just vary too much to follow this. Same with 
bottom vs top posting in NGs. My view, and I'm not trying to be 
unfriendly here, is if one doesn't like what they see,  ignore it, and 
don't respond.

+NG. Expect the unexpected. The warriors and self appointed moderators 
hang out there. Some are just begging for a fight.
+e-mail. If you aren't communicating with your friends, misunderstanding 
often prevail.
+Forums: Almost bliss. I must belong to 30 of them.

I must say that I am really puzzled by your comments about a footnote. I 
really don't use them much. I've probably posted thousands of msgs to 
NGs, forums, mail lists and I've never heard word one about footnotes. I 
use them as I see fit, and that's not very often. In fact, I like your 
use of the footnote below.

I'm not even going to touch etiquette. I'd be really impressed if anyone 
follows them. I'll just say this. Internet communication by any of the 
methods above is sometimes just plain weird. It takes patience to use 
these methods. That includes personal e-mail. Someone should write a 
book about it. Preferably a shrink of psychologist. IMHO, the internet 
is generally meant for easy and informal communications, and not studied 
carefully written posts. That doesn't mean some care isn't needed. I see 
matters as a running dialogs. Both  parties need to ask questions about 
clarity. Too much is often assumed.Maybe I'll write about it. Let's not 
hold  our breaths.

Hey, no footnotes used above. VBG

Cheers.


On 2/14/2010 1:39 PM, Philipp Bender wrote:
 Hi Wayne,

 (I wanted to answer you directly but the mail came back, don't know why)
 I have several points that
 you really should work on if you expect anyone to answer to your mails in
 future. First, you should check the destination of your messages. I got at
 least three of your messages addressed only for me, you obviously wanted to
 send them to the list but they only reached me. So I didn't answer because the
 mailing list should be an open and searchable discussion platform and I didn't
 want to forward your message to the list or something like that. Please check
 that carefully in future.

 The next thing is that everyone must have the feeling that you completely
 ignore replies. This link here should have been an alert for you:

 http://www.freebsd.org/doc/en/articles/mailing-list-faq/etiquette.html

 This was posted as reply to one of your mails. One thing explained there is to
 not
 cite the original mail after the own reply, instead you should cite the
 original issue at the beginning or in parts directly before the parts of the
 answer. See below:


 How to do foo bar?

 Just like that.

 You see? The same thing about your footnotes*.

 Another thing is the HTML I received from your adress two times -- HTML has
 neither benefit nor a good reputation in mailing lists. I delete HTML mails
 without reading it in most cases.

 And, but that's maybe more a personal thing, I find it very unfriendly to ask
 in the subject and write in the body something like (see subject) -- we take
 the time to read your message, in respect to that you also should take the
 time to ask a complete question.

 Please don't misunderstand this message -- I don't want to blame you, I want
 to help you and make sure that you get answers to your questions in future.

 Regards,
 Philipp

 * like this one here. They don't help you, they don't explain anything, they
 don't help me reading the message, they have absolutely no benefit.

 --
 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
 Matplotlib-users@lists.sourceforge.net
 

Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-15 Thread Eric Firing
Tim Michelsen wrote:
 Hello,
 I have a similar problem to:
 Suppose I plot a line from (0,0) to (1,1.5) to (2,2). Now I want to mark 
 (1,1.5) with a green circle. How is that done?
 

Your problem is not similar to the above; the problem above is solved 
with a simple call to plot.

 I am performing a curve fit and also showing a distribution in my plot.
 In order to help the reader to evaluate the result I would like to draw 
 certain
 boundaries (vertical and horizontal line).
 While I am aware on how to draw such lines, I would like to know wheather 
 there
 are some functions in matplotlib which help me to retrieve the coordinates
 
 a) at which two curves intersect
 b) at which a distribution reaches a certain value?
 

I think this is strictly a computational problem, not a plotting 
problem, so I suggest you post the question to the numpy or scipy lists.

Eric

 Example:
 How do I get the y-axis value which is reached by the green curve in 
 http://matplotlib.sourceforge.net/_images/histogram_demo_extended_021.png
 a x-axis value of in 175?
 
 I could proably use a solver from numpy like
 http://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.solve.html#numpy.linalg.solve
 but if I plot a distribution, the equation of the envelove is unknown at the
 first place.
 
 I'd appreciate your help or pointers to examples.
 
 Thanks a lot in advance,
 Timmie
 
 
 
 --
 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
 Matplotlib-users@lists.sourceforge.net
 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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Philipp Bender
Why don't you just use the code provided here:

http://matplotlib.sourceforge.net/examples/api/watermark_image.html

The first thing to do when you want to plot something is maybe to look at the 
examples section, isn't it? It shows pretty good how to not only mark points, 
but also to mark points with semi-transparent circles.

Please keep in mind: Plotting a set of lines and mark several points produces 
exactly the same image as plotting a set of lines and, above that, plot a set 
of circles. Maybe there are cleaner solutions, but to get an impression how 
to do things this might be enough.

Cheers
Philipp

--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Jae-Joon Lee
On Sat, Feb 13, 2010 at 11:28 PM, Wayne Watson
sierra_mtnv...@sbcglobal.net wrote:
 Well, I'm not quite sure what to say to your claim. In certain instances I
 am trying to get through to someone here that something is missing for
 newbies. In one word, pedagogy (as perhaps in a text book, not a reference
 manual or dictionary). I'm trying to be positive about it, and not negative.
 Positive criticism I hope. I apologize if I offend you.

The main matplotlib documentation has a section called user's guide
(http://matplotlib.sourceforge.net/contents.html). And the third item
in the user's guide is pyplot tutorial. So, I believe anyone who're
willing to learn matplotlib, is willing to read through some sections
of the user's guide and at least the tutorial. Is my standard too
high?

I'm not saying that the documentation is complete, and any suggestion
(or even contribution) will be very appreciated. However, while you're
saying that pedagogy is missing in our documentation, but it seems
like that you  haven't even read the very basic tutorial (because, as
John said, the answer to your original question is in that tutorial).
And I doubt how this could be positive criticism (while I understand
you want to be positive).

Anyhow, for your original question, try

  plot([0, 1, 2], [0, 1.5, 2], -)
  plot([1], [1.5], go)

-JJ

--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Filipe Pires Alvarenga Fernandes
Dear Wayne Watson,

As yourself I'm also new to matplotlib (and python) and I know that learning
such a library can be overwhelming at first. Still, this community/mailist
has answered all my newbie questions, even when they were clearly in the
manual or have already been answered in previous posts. All this free of
charge!

We actually have the privilege of having the developers inhabiting the user
list! This is not true in many users-lists that I dwell.

You mentioned matlab in your message as the way to go. If your project has a
budget for license and support, maybe that is indeed the way to go.
Otherwise, if you come from a matlab background as myself, you might be
interested in these two links:

http://www.scipy.org/NumPy_for_Matlab_Users

and

http://mathesaurus.sourceforge.net/matlab-numpy.html

They are not matplotlib references, but help to understand how things are
done before you fire-a-plot.

Hope that help you in your learning adventure. Also, you might find useful
to read this:

http://www.freebsd.org/doc/en/articles/mailing-list-faq/etiquette.html

It is BSD related, but most is true for any maillist.

Best, Filipe


On Sat, Feb 13, 2010 at 9:03 PM, Wayne Watson
sierra_mtnv...@sbcglobal.netwrote:

 Suppose I plot a line from (0,0) to (1,1.5) to (2,2). Now I want to mark
 (1,1.5) with a green circle. How is that done?
 --
 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


 --
 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
 Matplotlib-users@lists.sourceforge.net
 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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Wayne Watson
Did you see the figure I included to John? If not, let me put it simply. 
Suppose you have 50 straight sticks connected at their ends with some 
hook.  I want to color the hook holding stick 10 to 11, but color no 
other hook.  Not 99 hooks.

Yesterday, I tried  to do a simple plot of three points without markers. 
Worked fine. I then tried something like plot(1,2,bs).  I got an error 
. I tried variations on the plot with qualifiers. Zero. That seems like 
it should put the marker right at (1,2).

My immediate reaction to your example, is that it colors every hook. Am 
I missing something in your example?

On 2/14/2010 1:13 AM, Philipp Bender wrote:
 Why don't you just use the code provided here:

 http://matplotlib.sourceforge.net/examples/api/watermark_image.html

 The first thing to do when you want to plot something is maybe to look at the
 examples section, isn't it? It shows pretty good how to not only mark points,
 but also to mark points with semi-transparent circles.

 Please keep in mind: Plotting a set of lines and mark several points produces
 exactly the same image as plotting a set of lines and, above that, plot a set
 of circles. Maybe there are cleaner solutions, but to get an impression how
 to do things this might be enough.

 Cheers
 Philipp

 --
 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
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



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

--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Wayne Watson
Thank you for the code below. Yes, it actually does what I want it  to 
do. The difference in what I did similarly yesterday (see my response to 
Philipp moments ago) is the [ ], a list. All this  for one simple bit of 
list notation.

Somehow I'm not getting through to anyone what I have actually read. I 
do not plan to repeat it again here.  If I have some time in the near 
future, I will write a line by line criticism of the basic tutorial. OK, 
maybe the first page*. I already made some remarks about 5-6 days ago 
about that document. I think it was that one.  I'll submit it to one of 
the lists John provided on where I should send issues about the guide.

Now to put an end to the show() question. See my next post in a few 
minutes. Subject is down another pathway I think.

* Subject is FAQ Page Needs Some Work

On 2/14/2010 6:29 AM, Jae-Joon Lee wrote:
 On Sat, Feb 13, 2010 at 11:28 PM, Wayne Watson
 sierra_mtnv...@sbcglobal.net  wrote:

 Well, I'm not quite sure what to say to your claim. In certain instances I
 am trying to get through to someone here that something is missing for
 newbies. In one word, pedagogy (as perhaps in a text book, not a reference
 manual or dictionary). I'm trying to be positive about it, and not negative.
 Positive criticism I hope. I apologize if I offend you.
  
 The main matplotlib documentation has a section called user's guide
 (http://matplotlib.sourceforge.net/contents.html). And the third item
 in the user's guide is pyplot tutorial. So, I believe anyone who're
 willing to learn matplotlib, is willing to read through some sections
 of the user's guide and at least the tutorial. Is my standard too
 high?

 I'm not saying that the documentation is complete, and any suggestion
 (or even contribution) will be very appreciated. However, while you're
 saying that pedagogy is missing in our documentation, but it seems
 like that you  haven't even read the very basic tutorial (because, as
 John said, the answer to your original question is in that tutorial).
 And I doubt how this could be positive criticism (while I understand
 you want to be positive).

 Anyhow, for your original question, try

plot([0, 1, 2], [0, 1.5, 2], -)
plot([1], [1.5], go)

 -JJ



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

--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Philipp Bender
Hi Wayne,

(I wanted to answer you directly but the mail came back, don't know why) 
I have several points that 
you really should work on if you expect anyone to answer to your mails in 
future. First, you should check the destination of your messages. I got at 
least three of your messages addressed only for me, you obviously wanted to 
send them to the list but they only reached me. So I didn't answer because the 
mailing list should be an open and searchable discussion platform and I didn't 
want to forward your message to the list or something like that. Please check 
that carefully in future.

The next thing is that everyone must have the feeling that you completely 
ignore replies. This link here should have been an alert for you:

http://www.freebsd.org/doc/en/articles/mailing-list-faq/etiquette.html

This was posted as reply to one of your mails. One thing explained there is to 
not 
cite the original mail after the own reply, instead you should cite the 
original issue at the beginning or in parts directly before the parts of the 
answer. See below:

 How to do foo bar?

Just like that.

You see? The same thing about your footnotes*.

Another thing is the HTML I received from your adress two times -- HTML has 
neither benefit nor a good reputation in mailing lists. I delete HTML mails 
without reading it in most cases.

And, but that's maybe more a personal thing, I find it very unfriendly to ask 
in the subject and write in the body something like (see subject) -- we take 
the time to read your message, in respect to that you also should take the 
time to ask a complete question.

Please don't misunderstand this message -- I don't want to blame you, I want 
to help you and make sure that you get answers to your questions in future.

Regards,
Philipp

* like this one here. They don't help you, they don't explain anything, they 
don't help me reading the message, they have absolutely no benefit.

--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Eric Firing
Wayne Watson wrote:
 Thank you for the code below. Yes, it actually does what I want it  to 
 do. The difference in what I did similarly yesterday (see my response to 
 Philipp moments ago) is the [ ], a list. All this  for one simple bit of 
 list notation.

Newer versions of mpl do not require the list notation when plotting a 
single point.  I don't recall when I made that change.  Seems like quite 
a while ago, but evidently it was after the release you are using.

Eric

--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-13 Thread Wayne Watson
Suppose I plot a line from (0,0) to (1,1.5) to (2,2). Now I want to mark 
(1,1.5) with a green circle. How is that done?
-- 
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

--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users