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 23 results of 23

From: Eric F. <ef...@ha...> - 2010年02月14日 23:50:26
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
From: Jeffrey B. <je...@MI...> - 2010年02月14日 23:25:05
On Feb 14, 2010, at 5:41 PM, Jan Strube wrote:
> Dear matplotters,
>
> I'm trying to follow
> http://matplotlib.sourceforge.net/examples/pylab_examples/ 
> ganged_plots.html
> as an example how to turn of the ticks in the case of shared x axes.
> The tick labels are gone, but unfortunately, matplotlib still plots 
> a '1e5' on the axis for which I have turned off the tick labels.
> Please see the attached file for the problem
>
> How can I also switch of the exponent?
>
> Thanks,
> Jan
Try this:
ax.xaxis.set_major_formatter(mpl.ticker.ScalarFormatter 
(useOffset=False))
where 'ax' is the name of the top subplot.
Good luck,
Jeff
From: T J <tj...@gm...> - 2010年02月14日 22:49:13
I ran across:
 http://old.nabble.com/half-filled-markers-td24003576.html
The name "fillstyle" can give the wrong impression about what is being
filled. For example, see the comment here:
 http://www.mail-archive.com/mat...@li.../msg13074.html
It's probably too late, but would "markerfillstyle" be a better name for this?
Also, the current implementation fills half of the marker with the
markerfacecolor and doesn't fill the marker at all for the other half.
 I think a neat (and simple) feature would be for users to specify two
colors. Perhaps 'markerfacecolor2'. The change to the code is
minimal, but the functionality it brings is quite flexible.
markerfacecolor2 can default to 'none' to maintain current
functionality.
Should I file a ticket for this?
From: John H. <jd...@gm...> - 2010年02月14日 22:16:16
On Sun, Feb 14, 2010 at 3:34 PM, David Arnold <dwa...@su...> wrote:
> line, =ax.plot([0], [0])
> plt.show()
> linebuilder=LineBuilder(line)
>
> However, if I put the plt.show() on the last line, it works. Can anyone explain?
plt.show is meant to raise all GUI windows and start the mainloop.
For many user interface toolkits it is a blocking call. The only
supported use is as the last line of your script.
JDH
From: Philipp B. <li...@ro...> - 2010年02月14日 21:39:23
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.
From: David A. <dwa...@su...> - 2010年02月14日 21:34:54
All,
I am curious why this doesn't work:
# linebuilder.py
import matplotlib.pyplot as plt
class LineBuilder:
 def __init__(self, line):
 self.line=line
 self.xs=list(line.get_xdata())
 self.ys=list(line.get_ydata())
 self.cid=line.figure.canvas.mpl_connect('button_press_event', self)
 
 def __call__(self, event):
 print 'click', event
 if event.inaxes != self.line.axes:
 print event.inaxes
 print self.line.axes
 return
 self.xs.append(event.xdata)
 self.ys.append(event.ydata)
 self.line.set_data(self.xs, self.ys)
 self.line.figure.canvas.draw()
 
fig=plt.figure()
ax=fig.add_subplot(111)
ax.set_title('click to build line segments')
line, =ax.plot([0], [0])
plt.show()
linebuilder=LineBuilder(line)
However, if I put the plt.show() on the last line, it works. Can anyone explain?
David.
From: David A. <dwa...@su...> - 2010年02月14日 20:49:56
All,
Can anyone shed light on how python 3 is working together with matplotlib, scipy, and numpy?
David
From: Wayne W. <sie...@sb...> - 2010年02月14日 19:45:57
Well, well. One can get interesting results by persistence. The code I 
speak of here now works without using ipython.
All it took was moving the offending def (show() at the end) and putting 
it somewhere else where the completion of the def bounced right back 
into the main flow of the program. The desired result was that 
statistics print outs to the shell now do not block the advancement of 
the video to the next event. All this from the single clue I offered 
several times. Another plot in the program that works properly. Maybe 
that plot and my plot break some fundamental Python law, but they both work.
So far so good. Done.
Now to add the individual markers to the path at key points, as per 
finally concluding that wild goose chase with Jae-Joon Lee a short while 
ago.
On 2/12/2010 7:40 PM, Wayne Watson wrote:
> Certainly in IDLE, when one hits a show() in a def, the program does not
> continue to the next statement. It goes somewhere else, because my
> program continues normally. Apparently, it goes back up the def calls to
> the "main" program, which is a loop that just reads the next file to
> perform more of what I expect. If I know this to be true*, that allows
> a "workaround" with globals.
>
> * There is another def that uses plot-show, and it continues without any
> notable difficulty. The show() is the last statement in the def. Of
> course, since show() is a legitimate use, if one knows the "end" rule,
> this seems quite reasonable way to operate.
> 
-- 
"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: Wayne W. <sie...@sb...> - 2010年02月14日 19:39:30
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
> <sie...@sb...> 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
From: Brendan B. <bre...@br...> - 2010年02月14日 19:19:15
Brendan Barnwell wrote:
> 	I'm trying to find the quickest way to erase a rectangular area of 
> the figure canvas. I tried using canvas.restore_region with the 
> optional bbox argument, but there seems to be some mismatch between 
> the measurement units of the saved buffer object and the currently 
> shown data. For instance, if I have a Text object on my plot, I tried 
> this:
> 
> bbox = g.text.get_window_extent()
> canvas.restore_region(background, bbox)
> 
> . . . but it does not correctly block out the text. (The restored 
> rectangle from the background appears elsewhere on the axes.) How can 
> I convert the buffer coordinates to the coordinates of the the 
> displayed plot?
	I'm sorry to bump my own post, but I would really appreciate some 
help with this. I've been wrestling with it for a couple days now, 
and I cannot figure out how the coordinate system of the saved canvas 
is related to the axes coordinates. I have found that with 
bbox.transformed(ax.transData) I can at least get the coordinates 
scaled to fit on the axes, but they are still offset in position from 
where the box actually appears on the canvas. I can't figure out how 
to compute this offset.
	By playing around with the coordinates manually, for instance, I've 
found that adjusting x by -52 and y by 21 appears to line up the 
canvas with the axes, but I can't see where these numbers -52 and 21 
would come from. My saved canvas buffer's get_extents() method 
returns (65, 50, 586, 443), so I thought that the appropriate offsets 
would be 65 and 50, but that doesn't work.
	So, what coordinates (x1, y1, x2, y2) do I need to use in 
canvas.restore_region(savedBuffer, (x1, y1, x2, y2)) in order to 
restore precisely the area of canvas occupied by a patch drawn at axis 
coordinates (a1, b1, a2, b2)?
Thanks?
-- 
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is 
no path, and leave a trail."
 --author unknown
From: Wayne W. <sie...@sb...> - 2010年02月14日 19:08:48
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
> Mat...@li...
> 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
From: Philipp B. <li...@ro...> - 2010年02月14日 17:48:15
Hi Nico,
I didn't test it, but maybe with something like that:
rc('text', usetex=True)
[taken from 
http://matplotlib.sourceforge.net/plot_directive/mpl_examples/pylab_examples/tex_demo.py]
ax.set_xticks((-pi,pi))
ax.set_xticklabels(('$-\pi$','$\pi$'))
[taken from 
http://matplotlib.sourceforge.net/examples/pylab_examples/integral_demo.html]
Cheers,
Philipp
From: Charles R H. <cha...@gm...> - 2010年02月14日 17:23:23
Lines 147-151 of __init__ need to be changed to
import numpy
nn = numpy.__version__.split('.')
if not (int(nn[0]) > 1 or int(nn[0]) == 1 and int(nn[1]) >= 1):
 raise ImportError(
 'numpy 1.1 or later is required; you have %s' %
numpy.__version__)
Chuck
From: Filipe P. A. F. <oc...@gm...> - 2010年02月14日 16:11:30
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
<sie...@sb...>wrote:
> 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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Jae-Joon L. <lee...@gm...> - 2010年02月14日 14:30:10
On Sat, Feb 13, 2010 at 11:28 PM, Wayne Watson
<sie...@sb...> 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
From: Nico S. <nic...@gm...> - 2010年02月14日 13:59:33
Hi,
I'm plotting a colorbar with
 pylab.colorbar(ticks=(-pi,0,pi))
and trying to add proper "\pi" labels to it. Couldn't find out how to
do that from the manual -- any hints here?
Cheers,
Nico
From: Philipp B. <li...@ro...> - 2010年02月14日 09:13:57
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
From: Mag G. <mag...@gm...> - 2010年02月14日 04:36:02
I manage 300 servers at my university lab. I would like to map out all
the cron entries into a nice graph but I am not sure what would be
appropriate. Can someone please suggest what would be ideal?
TIA
From: Wayne W. <sie...@sb...> - 2010年02月14日 04:29:06
Attachments: JoinedLineMarkers.png
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.
Note the post of my to-do list here a few days ago. Clearly I have a 
number of things to do to better understand what is going on, and I plan 
to do them. Every item was gleaned from this mailing list. Everyone. I 
have the 868 page pdf that that someone mentioned (It is perhaps the 
best source here, but is very long for newbies.), and I have searched it 
for clues on how to proceed in this instance. I have seen references to 
marker in the document, set_marker, edge, etc. I've looked through the 
doc you suggested in the link. I have looked at a good number or 
examples on various questions I have about matplotlib to see their 
applicability. Examples are not necessarily education. I'm not sure you 
really understand my question.
I see examples on how to produce markers at every join of lines.That's 
really easy. I do not see how to put a single marker on the plot. Not 
one at each join. I'll draw you a picture and attach it. The attachment 
consists of maybe 100 joined lines.
They are so short that they look like a straight line in many cases. 
Nevertheless,I'd like to mark the joins in such a way that suggests 
meaningful points. These lines represent a path. Sometimes it dodges 
away from the main path a good distance, or may go backwards*. At the 
start I'd like to put a marker (perhaps green), 90 points away I'd like 
to put another marker, and finally at the end another marker (perhaps 
red). The image I produced doesn't not exactly produce this, but the 
point is four markers, and not 100. Is it possible to do that? A friend 
of mine tells me that in MatLab that it is.
* Yes, I read about plot display navigation in the big 868 page file. 
This will have a good payoff to the users of the program I'm working 
on. The developer put an MPL plot in it, and no description of the plot 
navigation.
On 2/13/2010 6:55 PM, John Hunter wrote:
> On Sat, Feb 13, 2010 at 8:03 PM, Wayne Watson
> <sie...@sb...> wrote:
> 
>> Suppose I plot a line from (0,0) to (1,1.5) to (2,2). Now I want to mark
-- 
"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月14日 02:58:26
From: John H. <jd...@gm...> - 2010年02月14日 02:55:23
On Sat, Feb 13, 2010 at 8:03 PM, Wayne Watson
<sie...@sb...> wrote:
> 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?
You've posted repeatedly about how confusing the docs are, asking what
you should read and what steps you should take to learn python, numpy,
scipy, matplotlib, etc. Lots of people have given you detailed
responses. The answer to this particular question is covered in the
"pyplot tutorial" one of the first and most basic documents in the
matplotlib documentation, and it is covered in the first section of
that tutorial, which suggests that you haven't read or digested even
the most basic documentation.
 http://matplotlib.sourceforge.net/contents.html
We have spent years writing this code and provided hundreds of
examples, as well as 800+ pages of documentation in PDF and html
available for you to learn from. We don't expect you to read it all
before asking questions and as you've seen the people here are more
than happy to answer your questions. Give them the courtesy of paying
attention to their answers, and when they point you to documentation
or examples, read it before asking another variant of the same
question.
JDH
From: Wayne W. <sie...@sb...> - 2010年02月14日 02:04:03
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
From: C M <cmp...@gm...> - 2010年02月14日 00:50:17
On Sat, Feb 13, 2010 at 3:00 PM, Jae-Joon Lee <lee...@gm...> wrote:
> If you're happy with the default formatter behavior (which seems to
> match with your #3 requirement), just reuse it.
>
> class MyFormatter(ScalarFormatter):
>  def __call__(self, val, pos=None):
>    if val < 0:
>      return ''
>    else:
>      return ScalarFormatter.__call__(self, val)
>
>
> -JJ
Thank you very much. That is so simple and works beautifully.
Che
1 message has been excluded from this view by a project administrator.

Showing 23 results of 23

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 によって変換されたページ (->オリジナル) /