Commit 7c068c19 authored by Andrew Senior's avatar Andrew Senior

Merge branch '1-distorted-plots-with-octave-4-0' into 'master'

Extend Octave landscape printing bug workaround to Octave versions 3.8.x and 4.0.x

Checked on Ubuntu 16.04 with Octave 4.0.0.

Closes #1

See merge request !2
parents 76bb6e9f 43e8ace7
......@@ -38,11 +38,17 @@ pwr_tot=1e3*sum(txg.pwr);
psize=[11.69 8.27]; % A4, in inches (Octave 3.2.4 doesn't like cm)
ppos=[0 0 psize];
v=ver('Octave');
if strcmp(v.Version,'3.8.1')
[vnums,vc,vemsg]=sscanf(v.Version, '%d.%d');
if vc ~= 2
error('Unable to parse Octave version number');
end
if all(vnums==[3; 8]) || all(vnums==[4; 0])
warning('Doing workaround for landscape printing bug')
ppos([3 4])=ppos([4 3]);
end
fh=figure;
set(fh,'paperunits','inches','papersize',psize, ...
'paperorientation','landscape','paperposition',ppos);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment