[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Plotyy with reversed right axis not showing data for right axis
From: |
Gabino |
Subject: |
Plotyy with reversed right axis not showing data for right axis |
Date: |
Sun, 21 Apr 2019 21:24:30 -0500 (CDT) |
Hi There,
I'm creating a plot with several time series on the left axis and one on the
right axis. For the right axis the scale is reversed for lines to be plotted
upside down. The scale on the right axis, the color assigned to the axis,
and to the dataset in the legend are all recognized but the data fails to be
plotted.
[hax, h1, h2] = plotyy (AnimDates,subs{1,1}(:,5)*cfs2cms,AnimDates,...
subs{1,1}(:,14)*25.4);
set (h1,"color","b",lw,1.5); set (h2,"linestyle","-","color",g1,lw,1.5)
hold on
plot(AnimDates,subs{1,1}(:,8)*cfs2cms,'-',"color",gr1,lw,1.5,'parent',hax(1));
plot(AnimDates,subs{1,1}(:,7)*cfs2cms,'-',"color",or2,lw,1.5,'parent',hax(1));
plot(AnimDates,subs{1,1}(:,6)*cfs2cms, "-r",lw,1.5,'parent',hax(1));
set (hax(1),'ycolor',[0.15 0.15 0.15])
set (hax(2),"ydir","reverse",'ycolor',[0.1 0.1 0.1],'ylim',[0
200],'ytick',[0:40:200])
set (ax,"position",[0.11 0.53 0.83 0.43])
title("\bSubbasin 1 - [m^3/s]",fs,15)
set (ax,"FontSize",12,'box','on')
if plotObs==1
plot(ObDates,ObFlow(:,5),'-',"color","k",lw,1.5,'parent',hax(1));
lg=legend(params1,"orientation","vertical");
else
lg=legend(params,"orientation","vertical");
end
set (lg,"position",[0.15 0.85 0.25 0.09])
set (lg,"box","off")
xt=AnimDates(1:nodl:end,:);
set (ax,'xtick',xt)
datetick(ax,"x","mmmYY",'keepticks','keeplimits')
set (hax(1),'xlim',[735000 737300],'ylim',[0 2.5])
set (hax(2),'xlim',[735000 737300],'xcolor',[1 1 1])
Any idea on how to make visible the data on that right axis ? Thanks -
Gabriela
<http://octave.1599824.n4.nabble.com/file/t373303/plotyy.jpg>
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Plotyy with reversed right axis not showing data for right axis,
Gabino <=