help-octave
[Top][All Lists]
Advanced

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

Re: octave plotting vs. gnuplot plotting


From: Liam Groener
Subject: Re: octave plotting vs. gnuplot plotting
Date: Wed, 27 Jul 2011 00:37:54 -0700


On Jul 26, 2011, at 5:18 PM, Ben Abbott wrote:

To get the font you want for all text ...

setenv ("GNUTERM", "wxt");
set (0, "defaulttextfontname", "Linux Biolinum")
set (0, "defaultaxesfontname", "Linux Biolinum")
x = (-10):0.01:10;
plot (x, sin(x), "r")
title ("What?")
legend ("sin(x)")

To elaborate a bit on what Ben said, once you get plots you like, you may want to put some of the 'default' commands in your .octaverc file (~/.octaverc if you are using linux). That way, they will actually be defaults whenever you use octave. The first three commands above would qualify. There may be others you'll want too. For example my .octaverc file contains:
set(0,'defaultaxesfontsize',12);
set(0,'defaulttextfontsize',12);
set(0,'defaultlinelinewidth',1);

Once you have made a plot, you have quite a bit of control on how it looks. For example, to get the same y tick spacing as your gnuplot figure you could enter the commands:
h=gca;
set(h,'ytick',-1:0.2:1)
after the other plot commands. It takes a while to learn all this stuff though.

reply via email to

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