BaRud
BaRud

Reputation: 3230

how to change gnuplot's graph size

I am trying to plot a graph with increased font size in gnuplot. A typical example is:

p sin(x) w l lw 5
set border lw 4
set tics font "Halvetica Bold,20"

So, I am trying to have:

  1. adjust plot size without changing the canvas size to accommodate x/y label and tics
  2. to adjust space between tics and label

How can I achieve this? Kindly help.

Upvotes: 3

Views: 3329

Answers (1)

Christoph
Christoph

Reputation: 48440

The margins and the label positions depend on the total font size. You can specify this as part of the set terminal command.

The following script gives good margins and label positions:

set terminal wxt font ",20"
set border lw 4
plot sin(x) lw 5

For your example, you could adjust the margins with set lmargin ... and similar commands, and adjust the tic offset with set xtics offset ...:

set terminal wxt
set border lw 4
set tics font "Halvetica Bold,20"
set bmargin 3
set lmargin 10
set xtic offset 0,-1
set ytics offset -0.5,0
plot sin(x) lw 5

Upvotes: 4

Related Questions