help-octave
[Top][All Lists]
Advanced

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

Subplot: Same physical dimension of every plot-box (PlotBoxAspectRatio)


From: Martin Zenzes
Subject: Subplot: Same physical dimension of every plot-box (PlotBoxAspectRatio)
Date: Fri, 06 Aug 2010 19:08:57 +0200

Hi,

I'm trying to plot a complicated subplot-containing-Image into SVG, for
later tex-rendering (svg works for me, instead of the native
epslatex-terminal...).

But I'm having problems building a plot like
http://mega2000.de/~mzenzes/pics4web/2010-08-06_12-02-04_test.png with
consistent plotAreaDimensions over all subplots. Since the Latex-Code is
lengthy, gnuplot does the autoscaling of the plotArea
"wrong" (automatically instead of manually)... And there is no way for
latex to fix this...

Looking into the Matlab-Manual I found these possible solutions for my
problem:
        get(gca,'Position')
        get(gca,'PlotBoxAspectRatio')
But either of them is supported in Octave-3.0. And If I switch to
Octave-3.2.3, printing into SVG doesn't work properly (and using a
development branch for productive work is not my intention)

Is there a suggestion how to get it right? Or any plans to implement the
missing functions?

One solution which comes to my mind is to use the lengthiest label as an
invisible (using spaces or \phantom{} or something like that) dummy-text
in all subplots. This would result in smaller plots of the same size,
with the ylabel very far away from the real plot... not so nice... needs
manual fixing of the result.

Greetings
        Martin

A minimal example would look like this:

signal = sin([0:0.1:3*pi]);
t = linspace(0,length(signal),length(signal));

subplot(2,1,1);
plot(t,signal);
set(gca,'YTick',[-0.5 0 0.5])
set(gca,'YTicklabel',['bla';'jo';'some lengthy text']);
set(gca,'YTick',[-0.5 0 0.5])

subplot(2,1,2);
plot(t,signal.^2);
set(gca,'YTick',[0.25 0.75 0.9])
set(gca,'YTicklabel',['bla';'jo';'less text']);
set(gca,'YTick',[0.25 0.75 0.9])




reply via email to

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