help-octave
[Top][All Lists]
Advanced

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

Print Landscape Fails


From: Thomas D. Dean
Subject: Print Landscape Fails
Date: Mon, 10 Mar 2014 11:06:21 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

I am attempting to print a plot in landscape.

However, the output is in portrait.

What am I doing wrong?

Tom Dean

stbd=[
 918 13.48 13.47 0.5;  ## converter off 0.5 amp nominal load
 936 12.57 12.60 0.5;
 938 12.13 12.35 8.5;  ## 8.5 amp load
 957 12.12 12.38 8.5;
1011 12.10 12.36 8.5;
1055 11.99 12.25 8.5;
1107 11.94 12.21 8.5;
1122 11.88 12.15 8.5;
1139 11.79 12.06 8.5;
1212 11.42 11.70 8.5;
1222 11.01 11.26 8.5;
1223 10.86 11.08 8.5;  ## inverter had a low voltage event
1225 11.89 11.93 0.5
];

port=[
1229 12.69 12.73 0.5;  ## converter off 0.5 amp nominal load
1242 12.11 12.38 8.5;  ## 8.5 amp load
1303 12.10 12.37 8.5;
1317 12.02 12.29 8.5;
1402 11.94 12.21 8.5;
1417 11.89 12.16 8.5;
1432 11.83 12.10 8.5;
1447 11.78 12.05 8.5;
];

function [t]=elapsed(hhmm)
  t=(floor(hhmm./100))*60+mod(hhmm,100);
  t-=t(1,1);
endfunction;

stbd_batt_ohms=abs((stbd(3,3)-stbd(2,3)))/8;
tmp=stbd(stbd(:,4)==8.5,:);
stbd_ohms=(tmp(:,3)-tmp(:,2))./tmp(:,4);
stbd_fit=polyfit(elapsed(tmp(:,1)),tmp(:,3),1);
stbd_bca_8=(10.5-stbd_fit(2))/stbd_fit(1);
stbd_bca=stbd_bca_8*8/25; ## estimate bca

port_batt_ohms=abs((port(2,3)-port(1,3)))/8;
tmp=port(port(:,4)==8.5,:);
port_ohms=(tmp(:,3)-tmp(:,2))./tmp(:,4);
port_fit=polyfit(elapsed(tmp(:,1)),tmp(:,3),1);
## find time for voltage to drop to 10.5 volts
port_bca_8=(10.5-port_fit(2))/port_fit(1);
port_bca=port_bca_8*8/25; ## estimate bca

  subplot(2,2,1);
  plot(stbd(:,1),[stbd(:,2:3),polyval(stbd_fit,stbd(:,1))]);
  title("Stbd Battery Volts");
  legend("Panel","Battery","Fit");
  xlabel("time");, ylabel("volts");
  grid;
  subplot(2,2,3);
  plot(stbd(:,1),stbd(:,4));
  title("Load Amps");
  xlabel("time");, ylabel("amps");
  grid;
  subplot(2,2,2);
  plot(port(:,1),[port(:,2:3),polyval(port_fit,port(:,1))]);
  title("Port Battery Volts");
  legend("Panel","Battery","Fit");
  xlabel("time");, ylabel("volts");
  grid;
  subplot(2,2,4);
  plot(port(:,1),port(:,4));
  title("Load Amps");
  xlabel("time");, ylabel("amps");
  grid;
  orient landscape;
  print -landscape Battery.png;


reply via email to

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