I would just call use `plot` and keep track of the Line2D objects returned.
On Thu Dec 11 2014 at 10:40:05 AM Nils Wagner
wrote:
> Hi Ben,
>
> I have attached a sample scatter plot. The task is to add lines to the
> scatter plot.
>
> Nils
>
>
> On Thu, Dec 11, 2014 at 3:47 PM, Benjamin Root wro
Hi Ben,
I have attached a sample scatter plot. The task is to add lines to the
scatter plot.
Nils
On Thu, Dec 11, 2014 at 3:47 PM, Benjamin Root wrote:
> Nils,
>
> Perhaps the rectangle selector might be of use? It defaults to a draw mode
> of 'box', but you can set it to line so that it look
Nils,
Perhaps the rectangle selector might be of use? It defaults to a draw mode
of 'box', but you can set it to line so that it looks like a ruler widget.
http://matplotlib.org/api/widgets_api.html#matplotlib.widgets.RectangleSelector
I can imagine that you could set up a selector callback that
Hi all,
how can I create line segments between consecutive selected points of a
scatter plot in an interactive manner ? It should be possible to create
several unclosed polygonal lines. Each polygonal line might have
a different color.
A small example is appreciated.
Thanks in advance.
--
V
On 06/15/2011 12:53 PM, jonasr wrote:
>
> Thank you for the fast reply, according to you line and "line," shouldt make
> a difference in this case,
No, that's not what I said. Using "line" gives you a list with one
element, but using "line," gives you the element itself, not the list.
> i tried
Thank you for the fast reply, according to you line and "line," shouldt make
a difference in this case,
i tried the code with line and line, and it only works with line, ?
so you say if i use
a=[1,2,3]
then b, = a should be 1 ? i just get the error message to many values to
unpack ...
efir
On 06/15/2011 12:35 PM, jonasr wrote:
>
> hello,
>
> a lot of matplotlib examples i saw included the usage of line, i.e.
>
> from pylab import *
> import time
>
> ion()
>
> tstart = time.time() # for profiling
> x = arange(0,2*pi,0.01)# x-array
> line, = plot(x,sin(x))
> f
hello,
a lot of matplotlib examples i saw included the usage of line, i.e.
from pylab import *
import time
ion()
tstart = time.time() # for profiling
x = arange(0,2*pi,0.01)# x-array
line, = plot(x,sin(x))
for i in arange(1,200):
line.set_ydata(sin(x+i/10.0)) # u
Wonderful, thanks - that was far too easy to be
thought of :)
Cheers,
Nix
On 05/30/2011 05:21 AM, Benjamin Root wrote:
> > On Monday, May 30, 2011, Mondsuechtiger wrote:
>> >> -BEGIN PGP SIGNED MESSAGE-
>> >> Hash: SHA1
>> >>
>> >>
>> >> Hello,
>> >>
>> >> I would like to stack s
On Mon, May 30, 2011 at 1:12 PM, Eric Firing wrote:
> On 05/30/2011 05:21 AM, Benjamin Root wrote:
> > On Monday, May 30, 2011, Mondsuechtiger wrote:
> >> -BEGIN PGP SIGNED MESSAGE-
> >> Hash: SHA1
> >>
> >>
> >> Hello,
> >>
> >> I would like to stack subplots in a figure with a couple o
On 05/30/2011 05:21 AM, Benjamin Root wrote:
> On Monday, May 30, 2011, Mondsuechtiger wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>>
>> Hello,
>>
>> I would like to stack subplots in a figure with a couple of basic
>> x,y-line plots with the subplot frames removed.
>> But possib
On Monday, May 30, 2011, Mondsuechtiger wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> Hello,
>
> I would like to stack subplots in a figure with a couple of basic
> x,y-line plots with the subplot frames removed.
> But possible overlap of subplots is limited, because the drawn dat
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
I would like to stack subplots in a figure with a couple of basic
x,y-line plots with the subplot frames removed.
But possible overlap of subplots is limited, because the drawn data
lines are clipped on the border, if you'd lets say manually r
On Sep 11, 2010, at 12:00 PM, Radek Machulka wrote:
> Hi Folks,
>
> I am trying to do something similar to
> http://matplotlib.sourceforge.net/examples/pylab_examples/scatter_hist.html,
> but with a line plots instead of histograms.
> My problem is how to set orientation of line plot if there is
Hi Folks,
I am trying to do something similar to
http://matplotlib.sourceforge.net/examples/pylab_examples/scatter_hist.html,
but with a line plots instead of histograms.
My problem is how to set orientation of line plot if there is no
'orientation' argument (line axHisty.hist(y, bins=bins,
orient
Perfect thank you, no wonder I didnt find it, plt.gca().add_collection(lc)
never found its way to my radar.
Cheers,
Brian
On Sep 7, 2010, at 7:58 PM, Ryan May wrote:
> On Tue, Sep 7, 2010 at 6:50 PM, Brian Larsen wrote:
>> Hey all,
>> I think I know the answer here as "no" or something, bu
This is of interest to me, and it's nice to know that this is do-able
with matplotlib, but like many of the examples, I find it sorely lacking
in documentation. For example, why are the points and segments arrays
shaped so specifically the way they are? Why the call to set_array?
Could the same t
On Tue, Sep 7, 2010 at 6:50 PM, Brian Larsen wrote:
> Hey all,
> I think I know the answer here as "no" or something, but say I have a curve
> I want to plot and I want the color to change along the curve to denote the
> 3rd variable is there anyway to do this is matplotlib?
> What I mean is take
Hey all,
I think I know the answer here as "no" or something, but say I have a curve I
want to plot and I want the color to change along the curve to denote the 3rd
variable is there anyway to do this is matplotlib?
What I mean is take the simple plot
from pylab import *
plot(range(30), rang
On Fri, Jan 15, 2010 at 12:19 PM, Paweł Rumian wrote:
> 2010/1/15 Michael Droettboom :
>> Can you try building matplotlib 0.99.1.1 from the tarball, rather than the
>> gentoo package? That would help to rule out any of the gentoo-specific
>> changes. Nothing in the portage leaps out at me as pro
2010/1/15 Michael Droettboom :
> Can you try building matplotlib 0.99.1.1 from the tarball, rather than the
> gentoo package? That would help to rule out any of the gentoo-specific
> changes. Nothing in the portage leaps out at me as problematic, but we
> should rule that out.
I was trying to av
I just tested 0.99.1.2 (no 0.99.1.1 tarball seems available on SF) and
svn trunk and found no trouble with either on Ubuntu Karmic amd64.
-Andrew
--
Throughout its 18-year history, RSA Conference consistently attracts the
Can you try building matplotlib 0.99.1.1 from the tarball, rather than
the gentoo package? That would help to rule out any of the
gentoo-specific changes. Nothing in the portage leaps out at me as
problematic, but we should rule that out.
Mike
Paweł Rumian wrote:
> 2010/1/15 Michael Droettbo
2010/1/15 Michael Droettboom :
>> Hi Paweł, to repeat a point that may have been lost in Michael's first
>> email, some code that produces the problem will be greatly useful in
>> tracking down what's going on.
> If I gather correctly, the masked_demo.py example in the matplotlib source
> is suffic
Andrew Straw wrote:
> Paweł Rumian wrote:
>
>> 2010/1/14 Michael Droettboom :
>>
>>
>>> What backend are you using? Agg, Cairo and Wx all check out for me. The
>>> examples you point to don't look like Agg output to me...
>>>
>>>
>> The examples were produced using savefig
Paweł Rumian wrote:
> 2010/1/14 Michael Droettboom :
>
>> What backend are you using? Agg, Cairo and Wx all check out for me. The
>> examples you point to don't look like Agg output to me...
>>
>
> The examples were produced using savefig and PNG, but I've tried GTK
> and Qt with Agg and
2010/1/14 Michael Droettboom :
> What backend are you using? Agg, Cairo and Wx all check out for me. The
> examples you point to don't look like Agg output to me...
The examples were produced using savefig and PNG, but I've tried GTK
and Qt with Agg and Cairo - neither of them works.
> Do you h
I'm not sure what the cause may be, particularly since I can't reproduce
it myself with matplotlib 0.99.1.1.
What backend are you using? Agg, Cairo and Wx all check out for me.
The examples you point to don't look like Agg output to me... Do you
have anything in your matplotlibrc?
Mike
Paw
Does this example work for you?
http://matplotlib.sourceforge.net/examples/pylab_examples/masked_demo.html
I don't have scikits.timeseries installed, so I can't confirm whether
your original attached example works or not. Can you produce a
standalone example that reproduces the problem?
M
OK, I've done more tests.
The problem occurs always when plotting data from masked array with lines.
When there is a masked field in the array, drawing is stopped, and so
if the first element is masked, no output can be seen.
When all fields are unmasked, there is no problem.
Also, drawing with
hello,
I'm a quite new user of matplotlib - currently I'm working with
scikits.timeseries and ran into a problem with rendering plots.
I can draw scatter plots with dots ('.'), but when using lines ('-',
'--', or similar) the graph breaks when missing data occurs.
The best way to describe the pr
On Mon, Dec 28, 2009 at 12:39 AM, Eric Firing wrote:
> So, which way is better? I assume the change is an improvement, because
> the behavior with a list should be the same as with an ndarray.
>
I agree with you.
>
> We could split the recaching up into parts that can be done independently on
Jae-Joon Lee wrote:
> On Sun, Dec 27, 2009 at 7:31 PM, Eric Firing wrote:
>> I don't understand what your script, below, is intended to do or show. I
>> haven't run it with mpl prior to my change. With the change, it simply
>> draws a single line, or at least that is all I see on the plot.
>
> B
On Sun, Dec 27, 2009 at 7:31 PM, Eric Firing wrote:
> I don't understand what your script, below, is intended to do or show. I
> haven't run it with mpl prior to my change. With the change, it simply
> draws a single line, or at least that is all I see on the plot.
Before your change, it draws t
Eric Firing wrote:
>> I went ahead and committed (svn rev 8054) changes that I think address
>> the problem, and that should slightly improve speed as well in some
>> cases, without slowing anything down in other reasonable cases--unless
>> there are subtleties I am missing. Or maybe I am missi
>
> I went ahead and committed (svn rev 8054) changes that I think address
> the problem, and that should slightly improve speed as well in some
> cases, without slowing anything down in other reasonable cases--unless
> there are subtleties I am missing. Or maybe I am missing something
> bla
Jae-Joon Lee wrote:
> On Sun, Dec 27, 2009 at 2:37 PM, Eric Firing wrote:
>> What are the circumstances under which one would call set_data() and not
>> want or need an update?
>
> If you ask me, I'm +1 to update the plot always. But, apparently, the
> original author of this code wanted to do so
On Sun, Dec 27, 2009 at 2:37 PM, Eric Firing wrote:
> What are the circumstances under which one would call set_data() and not
> want or need an update?
If you ask me, I'm +1 to update the plot always. But, apparently, the
original author of this code wanted to do some checks to avoid
unnecessary
Jae-Joon Lee wrote:
> I just filed a bug related with this.
>
> https://sourceforge.net/tracker/?func=detail&aid=2917758&group_id=80706&atid=560720
>
>
> I think the possible solution could be
>
> 1) we keep the copied version of the input data as a cache, and
> provide a api to access the cac
I just filed a bug related with this.
https://sourceforge.net/tracker/?func=detail&aid=2917758&group_id=80706&atid=560720
I think the possible solution could be
1) we keep the copied version of the input data as a cache, and
provide a api to access the cache.
2) Or forsce set_[x|y]data to alw
Hi to all,
I'm doing a simple animation like this:
--
ion()
x = arange(0,2,0.01)
y = zeros_like(x)
y[45:55]=1
l, = plot(x,y)
D = 0.1
h = x[1]-x[0]
dt = 0.0001;
def nabla(v,h):
na = zeros_like(v)
na[1:-1] = (v[2:]-2*v[1:-1]+v[:-2])
na[0],na[-1] = 0,0
return na/(h**2)
for i in ra
John Hunter-4 wrote:
>
> On Tue, Nov 24, 2009 at 5:38 PM, thumperj
> wrote:
>>
>> I'm certain this is in an example somewhere but I can't seem to find it.
>> If
>> someone can just point me to the example I'll take it from there. Thank
>> you!
>>
>> I have a line chart. I just want to add t
On Tue, Nov 24, 2009 at 5:38 PM, thumperj wrote:
>
> I'm certain this is in an example somewhere but I can't seem to find it. If
> someone can just point me to the example I'll take it from there. Thank
> you!
>
> I have a line chart. I just want to add text or callout box that shows the
> last
I'm certain this is in an example somewhere but I can't seem to find it. If
someone can just point me to the example I'll take it from there. Thank
you!
I have a line chart. I just want to add text or callout box that shows the
last value in the line.
Thank you very much,
Chris
--
View this
Pavlo Shchelokovskyy wrote:
is there is a consistent
> way to scale at once thickness of everything drawn on figure, i.e.
> axis, plots, fonts?..
I think what you want is to set a dpi that works for you:
http://www.scipy.org/Cookbook/Matplotlib/AdjustingImageSize
-Chris
--
Christopher Bark
Hi all,
while I was using matplotlib mostly in interactive mode, the thickness
of lines displayed was OK for me, by now I want to generate a plot to
use on slides for beamer, and the thickness of all lines is totally
not sufficient, especially when using transparent figure/axis
background.
I know
On Mon, Apr 27, 2009 at 11:24 AM, Sandro Tosi wrote:
> On Mon, Apr 27, 2009 at 18:11, Jouni K. Seppänen wrote:
> > Sandro Tosi writes:
> >> I think there's some sort of typo there, since it's setp
> >
> > Yes, it used to be set but then Python added the set data type with the
> > same name, so
On Mon, Apr 27, 2009 at 18:11, Jouni K. Seppänen wrote:
> Sandro Tosi writes:
>> I think there's some sort of typo there, since it's setp
>
> Yes, it used to be set but then Python added the set data type with the
> same name, so references to the old name could remain in some
> documentation. Th
Sandro Tosi writes:
> I think there's some sort of typo there, since it's setp
Yes, it used to be set but then Python added the set data type with the
same name, so references to the old name could remain in some
documentation. This seems to be fixed in the current version of the
tutorial, thoug
Hi Bala,
On Mon, Apr 27, 2009 at 15:25, Bala subramanian
wrote:
> Friends,
> I am going through John Hunter's The Matplotlib User’s Guide. In the user
> guide, one of the three ways of changing the line properties is given as
> follows
>
> Using set to control line properties
l i n e s = p l
Friends,
I am going through John Hunter's The Matplotlib User’s Guide. In the user
guide, one of the three ways of changing the line properties is given as
follows
Using set to control line properties
>>> l i n e s = p l o t ( t , s1 )
>>> s e t ( l i n e s , ma r k e r s i z e =15 , marker=’d’ ,
[snip]
> Are you aware that the plot method can plot the columns of
> 2-D arrays?
> Any kwargs apply to all the lines. When plot does this, it
> makes a list of lines, not a line collection, so it is
> similar to looping over a set of single plot commands. There
> is no particular speed adv
Anthony M. Floyd wrote:
>> -Original Message-
>> From: Eric Firing [mailto:[EMAIL PROTECTED]
>
> [snip]
>
>> It probably comes down to program simplicity and readability,
>> not speed, in your case.
>>
>> Eric
>
>
> Hi Eric,
>
> Thanks for this. That's essentially the decision I had
> -Original Message-
> From: Eric Firing [mailto:[EMAIL PROTECTED]
[snip]
> It probably comes down to program simplicity and readability,
> not speed, in your case.
>
> Eric
Hi Eric,
Thanks for this. That's essentially the decision I had reached, but I
was also wondering if I'd mis
Anthony,
When I do a quick test of line_collection.py versus a modification that
makes individual plot calls, with the results written to a png file, I
get about 1.05 s with the collection and 1.2 s with the lines. But a
trivial plot still takes 0.52 seconds, so if you subtract out this
gener
I'm trying to figure out the best way to handle the following situation:
I have a wxApp that embeds a matplotlib figure in a panel. I use custom
code to control adding and removing series from the axes in this figure,
with some pretty fine grained control on when things get drawn, zoomed,
etc. To
Hi gang,
I apologize to come up always with noob questions, but it's been a
while I used matplotlib seriously...
Related to the "deleting a line from a plot" subject, I was thinking
about *hiding* the line instead of completely erasing it from the
graph. This is because the user can check or u
Hi
When using a legend with more than one entry, the line height of the
entries differ when mixing text with and without descender.
Another interpretation is that there should be more vertical space
between 2 entries, when the 1st text has no descender.
The same problem appears when one text has
On Friday 29 September 2006 07:50, Jouni K Seppanen wrote:
> Stefan van der Walt <[EMAIL PROTECTED]> writes:
> > plot(x,y,'o',markerfacecolor='w')
>
> This makes circles filled with white. If you want circles that don't
> obscure whatever is behind them, use markerfacecolor=None.
Jouni, Bill, thank
Stefan van der Walt <[EMAIL PROTECTED]> writes:
> plot(x,y,'o',markerfacecolor='w')
This makes circles filled with white. If you want circles that don't
obscure whatever is behind them, use markerfacecolor=None.
--
Jouni
On Thursday 28 September 2006 1:24 pm, Christian Meesters wrote:
> Hi,
>
> I'd like to plot experimental data points with fitted data through
> it. This time best would be to plot hollow circles for the
> experimental data. Pretty much like literal 'o's (except, of
> course, that passing 'o' result
>
> I'm sure someone will soon provide you with an insightful answer. In
> the meantime, you can fudge it by doing
>
> plot(x,y,'o',markerfacecolor='w')
And this is not an "insightful answer"? Anyway, thanks a lot!
Christian (who was to tired to look at the right place ...)
On Thu, Sep 28, 2006 at 08:24:44PM +0200, Christian Meesters wrote:
> I'd like to plot experimental data points with fitted data through it. This
> time best would be to plot hollow circles for the experimental data. Pretty
> much like literal 'o's (except, of course, that passing 'o' results in
Hi,
I'd like to plot experimental data points with fitted data through it. This
time best would be to plot hollow circles for the experimental data. Pretty
much like literal 'o's (except, of course, that passing 'o' results in thick
circles).
Is this possible somehow?
TIA
Christian
--
Thanks John and Darren. I think i'll use the nan trick for now but
the masked array looks incredibly powerful. I'll take a look at the
masked array demo. Thanks once again for your help and some really
awesome plotting software!
--Tom
On 6/27/06, Darren Dale <[EMAIL PROTECTED]> wrote:
> On T
On Tuesday 27 June 2006 14:16, Tom Denniston wrote:
> When you do a line scatter plot in excel and data is missing between
> two observations excel doesn't connect those two observations with a
> line. So what you see is a line with gaps where the data is missing.
> Missing data is
> defined as ha
> "Tom" == Tom Denniston <[EMAIL PROTECTED]> writes:
Tom> When you do a line scatter plot in excel and data is missing
Tom> between two observations excel doesn't connect those two
Tom> observations with a line. So what you see is a line with
Tom> gaps where the data is missin
When you do a line scatter plot in excel and data is missing between
two observations excel doesn't connect those two observations with a
line. So what you see is a line with gaps where the data is missing.
Missing data is
defined as having x values but no y value or vice versa. Is there a
good w
Hi, I'd do it the quick way:str = [...] # list of strings for the labels.x[:] # abcisse vectory[i][:] # list of ordinate vector (y[i][:] contains the data for the ith line)for i in range(10):
text(x[-1], y[i][-1], str[i], horizontalalignement='left')David2006/6/7, Webb Sprague <[EMAIL PROTECTED
Is there a way to programmatically write line labels, as in the
attached image? If it doesn't go through the list, basically I want a
label at the end of each of 10 or so lines in a plot.
Tx
<>
___
Matplotlib-users mailing list
Matplotlib-users@lists.s
70 matches
Mail list logo