help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Axis Markers


From: Ben Abbott
Subject: Re: Axis Markers
Date: Fri, 03 Oct 2008 18:52:01 -0400


On Oct 3, 2008, at 11:19 AM, Andrew Black wrote:

Hi Ben,

Here's an idea of what I had in mind. The scatter plot shows data
points. One of the averages represents a weighted average of the scatter
data and the other is an average based on independent measurements of
the same system. So, the marker's numeric values are NOT based on the
scatter data - they are computed separately. I just want to layer those
figures on the scatter plot in an illuminative fashion.   Hope this
clarifies. Thanks for your help!  

-Andrew

I think I get the idea of where you'd like to put the labels.

If you don't mind not having xticklabels representing the horizontal values, you can set the axis "xtick" values and "xticklabel" values to create.

However, it would be easier to place lines on over the scatter plot by doing something like ...

## create some scattered data
x = (1:9) + rand([1,9]);
y = (1:9) + rand([1,9]) ;
wgt = (5+x);
avg = mean (x);
wavg = mean (wgt.*x) ./ mean (wgt);

## plot the data
figure(1)
clf
scatter (x, y)
hold on

yt = sum([98,2].*ylim/100);

## Plot the locations for the average and weighted average and label them
plot ([wavg, wavg], ylim, '--k')
text (wavg, yt, 'weighted average', ...
      'horizontalalignment', 'left', ...
      'verticalalignment', 'bottom', ...
      'fontsize', 12)
plot ([avg, avg], ylim, '--k')
text (avg, yt, 'average', ...
      'horizontalalignment', 'right', ...
      'verticalalignment', 'bottom', ...
      'fontsize', 12)

Is that sufficiently close to what you want?

Ben

reply via email to

[Prev in Thread] Current Thread [Next in Thread]