help-octave
[Top][All Lists]
Advanced

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

Re: question about xlabel/ylabel position in octave with AquaTerm


From: Dr. Ing. Dieter Jurzitza
Subject: Re: question about xlabel/ylabel position in octave with AquaTerm
Date: Wed, 26 Feb 2014 20:54:52 +0100
User-agent: KMail/1.13.6 (Linux/3.11.10-7-desktop; KDE/4.11.5; x86_64; ; )

To whom it might concern ....

I am shifting the labels of gnuplot around - not perfect, but close (for me 
...). Let me point out how this is working (I assume that the data have been 
exported from octave to a data file and the following lines go into some 
executable file using gnuplot syntax ...):

*****************************************************************************
#!/usr/bin/gnuplot

# 1.) I define some specific positions
XPOS=-0.11
YPOS=-0.08
X2POS=1.11
y2pos=1.11

# put arrows on the axes (if you like to ...)
set arrow 1 filled size graph 0.035,8 lt 16 lw 2 from graph XPOS,0.62 to \ 
graph XPOS,0.87
set arrow 2 filled size graph 0.035,8 lt 16 lw 2 from graph 0.6,YPOS to \
graph 0.77,YPOS
set arrow 3 filled size graph 0.035,8 lt 16 lw 2 from graph X2POS,0.62 to \ 
graph X2POS,0.87

# 2.) I am using the postscript - terminal:
set output "data.ps"
set terminal postscript enhanced color solid lw 2 "Arial,16"

# I set the actual x/y/x2/y2 - labels to blanks (explicitly _not_ empty! Not 
# "" but " ")

set xlabel " "
set ylabel " "
set x2label " "
set y2label " "

# now the "real labels"
set label 1 "f/Hz" at graph 0.5,YPOS
set label 2 "L/dB" at graph XPOS,0.5
set label 3 "{/Symbol j}/°" at graph X2POS,0.5
set label 4 "whatever" at graph 0.5,Y2POS

plot "data.dat" using 1:2 w l lw 2

*****************************************************************************

This implies exporting the graph to a file rather than plotting it directly. 
Given that, ghostscript is your friend. Using linux, you can make use of 
whatever kind of postscript to pdf converter - even such ones that reduce the 
picture size to what is mandatory, not to an entire sheet of letter or A4 
paper ...

Shifting the labels around is easy now. Just modify XPOS etc. according to 
your requirements. If you omit the "blank" standard - labels, your run into 
danger that the new labels get clipped as gnuplot reserves less space outside 
of the graph as entirely empty standard labels do not need space (and negative 
coordinates are not "usual" for gnuplot").

If you like to draw arrows (as shown above or even within the graph ...) I 
recommend to edit the gnuplot - file "prologue.ps" and remove the line "3.8 
setmiterlimit". Given this you can create nice arrows with sharp tips, 
otherwise you can't.

The only real disadvantage of all of this is the fact that this does not work 
from within octave - well, you could do so but using a terminal window is much 
simpler.

Take care,
thank you for all your work on octave,





Dieter Jurzitza


On Mittwoch, 26. Februar 2014 16:07:29 Ben Abbott wrote:
> On Feb 26, 2014, at 5:08 AM, Philippe Piot <address@hidden> wrote:
> > Dear All,
> > 
> >  I am using octave 3.6.4 on OS 10.8 with AquaTerm. In some of my plot
> > 
> > invoking xlabel (or ylabel), the text from xlabel/ylabel overlaps with
> > the axis (numerical) labels. I therefore tried to, e.g., shift the
*************
-- 
-----------------------------------------------------------

                               |
                                \
                 /\_/\           |
                | ~x~ |/-----\   /
                 \   /-       \_/
  ^^__   _        /  _  ____   /
 <°°__ \- \_/     |  |/    |  |
  ||  ||         _| _|    _| _|

if you really want to see the pictures above - use some font
with constant spacing like courier! :-)
-----------------------------------------------------------


reply via email to

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