|
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:
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 |
[Prev in Thread] | Current Thread | [Next in Thread] |