Axis Markers
Ben Abbott
bpabbott at mac.com
Fri Oct 3 17:52:01 CDT 2008
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20081003/b494187c/attachment.html
More information about the Help-octave
mailing list