Is it possible to set the font style and size of any type of gnuplot text (
like title, x/y-axis labels, legend, and labels) on X11 terminal? I'm aware
that it's easily done with the postscript terminal, but I would like to set
the fonts on the screen display, of which I use X11. Is there ANY way to
control such attributes for the display on screen (not just the fonts but
also the curve colors)? Is there a way to may be output to Postscript and
invoke a postscript file displayer from my own program? Any type of example
scripts would be a tremendous help.
Thanx much:)
Joanna
- -
[[[[ to unsubscribe from info-gnuplot, send an email with body
unsubscribe info-gnuplot
to majo...@dartmouth.edu
]]]]
> Is it possible to set the font style and size of any type of gnuplot text (
> like title, x/y-axis labels, legend, and labels) on X11 terminal? I'm aware
> that it's easily done with the postscript terminal, but I would like to set
> the fonts on the screen display, of which I use X11.
You can specify a font when starting gnuplot using the 'font' argument
of X. For example,
gnuplot -font -adobe-times-medium-r-normal-*-24-*-*-*-*-*-*-*
will create plots where all labels are printed a 24 pt Times font (if
this font is available). For a list of installed fonts, try for
example 'xfontsel'.
> Is there ANY way to
> control such attributes for the display on screen (not just the fonts but
> also the curve colors)?
The curve colors can be specified with the 'linetype' option of the
plot command:
gnuplot> plot sin(x) w l lt 1, cos(x) w l lt 2
gives you a red and a green curve. For a list of available colors,
just try
gnuplot> test
> Is there a way to may be output to Postscript and
> invoke a postscript file displayer from my own program? Any type of example
> scripts would be a tremendous help.
You can invoke an external command (for example, a postscript viewer
like gv) within gnuplot via '!gv'. For example, if you have the
following script 'test.gnu':
set term post
set outp 'test.ps'
plot sin(x) w l, cos(x) w l
set outp
!gv test.ps
running 'gnuplot test.gnu' will create the postscript file 'test.ps',
and then start the viewer gv to display it.
Hope this helps,
Lutz
Easier yet to say
set term post
set output '|gv -'
plot ...
--
Ethan A Merritt
You can do it by modfying the X resources, see 'help
x11->color_resources'. Put the following lines in a file 'gnuplot.res'
! --
gnuplot*background: white
gnuplot*textColor: black
gnuplot*borderColor: black
gnuplot*axisColor: black
gnuplot*line1Color: red
gnuplot*line2Color: green
gnuplot*line3Color: blue
gnuplot*line4Color: magenta
gnuplot*line5Color: cyan
gnuplot*line6Color: sienna
gnuplot*line7Color: orange
gnuplot*line8Color: coral
gnuplot*font: 9x15
! --
and type
# xrdb -merge gnuplot.res
then start gnuplot
see 'help x11->line_resources' for line styles.
--
Johannes