Request: make plotting of a single point more convenient

basically this works:

plot([1], [1], "*")

but I think it would be more convenient to add some kind of auto casting to the function in order to make this

plot(1, 1, "*")

work.

I use those single-point-plotting-commands a lot in order to highlight a special point in a series of data, but I forget the [] all the time.

Besides being much more convenient (at least for me) this behavior would also be much closer to the matlab version, since this works there without any problems.

Any ideas/comments/criticism on this?

I wrote a wrapper to do this for my own code because I wanted it so
much. I can't see why it would be a problem to support, it's only one
extra if statement.

+1 from me!

···

On Sat, Jul 25, 2009 at 1:16 AM, Jan Müller<mueller@...689...> wrote:

basically this works:

plot([1], [1], "*")

but I think it would be more convenient to add some kind of auto casting to the function in order to make this

plot(1, 1, "*")

work.

I use those single-point-plotting-commands a lot in order to highlight a special point in a series of data, but I forget the [] all the time.

Besides being much more convenient (at least for me) this behavior would also be much closer to the matlab version, since this works there without any problems.

Any ideas/comments/criticism on this?

------------------------------------------------------------------------------
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

--
Robert H. Clewley, Ph.D.
Assistant Professor
Department of Mathematics and Statistics
and Neuroscience Institute
Georgia State University
720 COE, 30 Pryor St
Atlanta, GA 30303, USA

tel: 404-413-6420 fax: 404-413-6403
http://www2.gsu.edu/~matrhc
http://brainsbehavior.gsu.edu/

Or zero extra statements, if one just replaces the

  if len(x.shape) == 1:
    x = x[:, np.newaxis]

lines with

  while len(x.shape) < 2:
    x = x[:, np.newaxis]

-- Nathaniel

···

On Sat, Jul 25, 2009 at 3:13 PM, Rob Clewley<rob.clewley@...149...> wrote:

I wrote a wrapper to do this for my own code because I wanted it so
much. I can't see why it would be a problem to support, it's only one
extra if statement.

Rob Clewley wrote:

I wrote a wrapper to do this for my own code because I wanted it so
much. I can't see why it would be a problem to support, it's only one
extra if statement.

+1 from me!

Done in svn 7294.

Eric

···

On Sat, Jul 25, 2009 at 1:16 AM, Jan Müller<mueller@...689...> wrote:

basically this works:

plot([1], [1], "*")

but I think it would be more convenient to add some kind of auto casting to the function in order to make this

plot(1, 1, "*")

work.

I use those single-point-plotting-commands a lot in order to highlight a special point in a series of data, but I forget the [] all the time.

Besides being much more convenient (at least for me) this behavior would also be much closer to the matlab version, since this works there without any problems.

Any ideas/comments/criticism on this?

------------------------------------------------------------------------------
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel