help-octave
[Top][All Lists]
Advanced

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

Setting the canvas/image size of plot in Octave


From: sayaliskulkarni
Subject: Setting the canvas/image size of plot in Octave
Date: Sun, 14 Apr 2013 23:25:02 -0700 (PDT)

Hello,

Am trying to plot multiple subplots in a single main plot. But this is
making the plots to cluttered. To avoid this I want to increase the window
size/canvas size of the main plot. I guess it is set to some default
resolution? How to change that?

Sample code below:
(this has total 9 plots - 3 rows x 3 columns. Now this can be even more -
say 10 rows, 3 columns. So I want to ensure that the plot height is more in
such cases, or width is more, as required)


subplot (3, 3, 1); x=[ 1 3 1]; bar(x); title ("title1"); set (gca, 'xtick',
[ 1 2 3]);set (gca, 'xticklabel', {'label11','label12','label13'}) ;
subplot (3, 3, 2); x=[ 2 1 1 1]; bar(x); set (gca, 'xtick', [ 1 2 3 4]);set
(gca, 'xticklabel', {'label21','label22','label23','label24'}) ;
subplot (3, 3, 3); x=[ 3 1 1]; bar(x); set (gca, 'xtick', [ 1 2 3]);set
(gca, 'xticklabel', {'4','2','0'}) ;
subplot (3, 3, 4); x=[ 3 10 2]; bar(x); title ("title2"); set (gca, 'xtick',
[ 1 2 3]);set (gca, 'xticklabel', {'label11','label12','label13'}) ;
subplot (3, 3, 5); x=[ 13 1 1]; bar(x); set (gca, 'xtick', [ 1 2 3]);set
(gca, 'xticklabel', {'label21','label22','label23'}) ;
subplot (3, 3, 6); x=[ 5 6 2 1 1]; bar(x); set (gca, 'xtick', [ 1 2 3 4
5]);set (gca, 'xticklabel', {'4','3','2','1','0'}) ;
subplot (3, 3, 7); x=[ 2 8 1]; bar(x); title ("title3"); set (gca, 'xtick',
[ 1 2 3]);set (gca, 'xticklabel', {'label11','label12','label13'}) ;
subplot (3, 3, 8); x=[ 8 1 2]; bar(x); set (gca, 'xtick', [ 1 2 3]);set
(gca, 'xticklabel', {'label21','label22','label23'}) ;
subplot (3, 3, 9); x=[ 1 2 5 1 1 1]; bar(x); set (gca, 'xtick', [ 1 2 3 4 5
6]);set (gca, 'xticklabel', {'5','4','3','2','1','0'}) ;
print '/tmp/testRun.png';

Thanks in advance for the help.
Regards
Sayali




--
View this message in context: 
http://octave.1599824.n4.nabble.com/Setting-the-canvas-image-size-of-plot-in-Octave-tp4651870.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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