Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Adjust Location of Where Markers Are Plotted

Subject: Adjust Location of Where Markers Are Plotted

From: Nate Jensen

Date: 26 Dec, 2012 16:22:08

Message: 1 of 4

If I run the following code:
plot(1,1,'^g')

The center of the triangle will be plotted exactly on the point (1,1).

Is there a way to adjust the location of where the triangle is plotted?

For example, instead of the center of the triangle located at (1,1), could I have the bottom, top, left, right, or any of the corners plotted at (1,1)?

Subject: Adjust Location of Where Markers Are Plotted

From: dpb

Date: 26 Dec, 2012 20:20:51

Message: 2 of 4

On 12/26/2012 10:22 AM, Nate Jensen wrote:
> If I run the following code:
> plot(1,1,'^g')
>
> The center of the triangle will be plotted exactly on the point (1,1).
>
> Is there a way to adjust the location of where the triangle is plotted?
>
> For example, instead of the center of the triangle located at (1,1),
> could I have the bottom, top, left, right, or any of the corners plotted
> at (1,1)?

Not automagically via some property setting, no (afaiaa, anyway).

Best I can suggest is to add a second call w/ the offset from the points
desired to set the position. A little wrapper function to do so would
be the ticket it would seem...it could query point size, etc., and do
the computation of the magnitude, etc., based just on a position
argument it would seem...

--

Subject: Adjust Location of Where Markers Are Plotted

From: Nate Jensen

Date: 27 Dec, 2012 01:39:09

Message: 3 of 4

dpb <none@non.net> wrote in message <kbfm5i$nlm$1@speranza.aioe.org>...
> On 12/26/2012 10:22 AM, Nate Jensen wrote:
> > If I run the following code:
> > plot(1,1,'^g')
> >
> > The center of the triangle will be plotted exactly on the point (1,1).
> >
> > Is there a way to adjust the location of where the triangle is plotted?
> >
> > For example, instead of the center of the triangle located at (1,1),
> > could I have the bottom, top, left, right, or any of the corners plotted
> > at (1,1)?
>
> Not automagically via some property setting, no (afaiaa, anyway).
>
> Best I can suggest is to add a second call w/ the offset from the points
> desired to set the position. A little wrapper function to do so would
> be the ticket it would seem...it could query point size, etc., and do
> the computation of the magnitude, etc., based just on a position
> argument it would seem...
>
> --

Hm...

That's what I feared. I was hoping somebody else had already figured it out. Oh well I'll see what I can come up with.

Subject: Adjust Location of Where Markers Are Plotted

From: dpb

Date: 27 Dec, 2012 15:34:56

Message: 4 of 4

On 12/26/2012 7:39 PM, Nate Jensen wrote:
...

>> Best I can suggest is to add a second call w/ the offset from the
>> points desired to set the position. A little wrapper function to do so
>> would be the ticket it would seem...it could query point size, etc.,
>> and do the computation of the magnitude, etc., based just on a
>> position argument it would seem...
>>
...

> Hm...
>
> That's what I feared. I was hoping somebody else had already figured it
> out. Oh well I'll see what I can come up with.

Search the File Exchange first, of course...

--

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us