From: Walter Roberson on
Ken wrote:

> ax1 = gca;
> hl1 = line(x,y1,'Color','b');
>
> hl3 = line(x, y2,'Color','r','Marker', '*','Parent',ax1);
> set(ax1,'XColor','b','YColor','b');
>
> ax2 = axes('Position',get(ax1,'Position'),...
> 'XAxisLocation','top',...
> 'YAxisLocation','right',...
> 'Color','none',...
> 'XColor','k','YColor','k');

hold(ax2, 'on')

> scatter(ax2, x(1), y1(1));
>
> but the problem is that the scatter plot erases the graph(x, y2) which
> is I don't want.
From: Ken on
Thanks Walter,

Yes I have tried it. The problem I am having now with:

hold(ax2, 'on');
scatter(ax2, x(1), y1(1), '*');

It changes the entire the second graph(x, y2) to '*', not just (x(1), y1(1)).

How do I fix it?

Thanks,

-ken



Walter Roberson <roberson(a)hushmail.com> wrote in message <hoi4rh$sor$1(a)canopus.cc.umanitoba.ca>...
> Ken wrote:
>
> > ax1 = gca;
> > hl1 = line(x,y1,'Color','b');
> >
> > hl3 = line(x, y2,'Color','r','Marker', '*','Parent',ax1);
> > set(ax1,'XColor','b','YColor','b');
> >
> > ax2 = axes('Position',get(ax1,'Position'),...
> > 'XAxisLocation','top',...
> > 'YAxisLocation','right',...
> > 'Color','none',...
> > 'XColor','k','YColor','k');
>
> hold(ax2, 'on')
>
> > scatter(ax2, x(1), y1(1));
> >
> > but the problem is that the scatter plot erases the graph(x, y2) which
> > is I don't want.