File: fontfile.dem

package info (click to toggle)
gnuplot 5.4.1%2Bdfsg1-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,316 kB
  • sloc: ansic: 85,877; cpp: 7,440; makefile: 2,548; javascript: 2,322; sh: 1,542; lisp: 667; perl: 304; pascal: 191; tcl: 88; python: 46
file content (43 lines) | stat: -rw-r--r-- 1,716 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# This file demonstrates new features in gnuplot 3.8i
# -1- loading fontfiles for postscript output
print "\n This file demonstrates how to use postscript type 1 font"
print " files with gnuplot."
print "\n Please note that this demo runs only on postscript terminal,"
print " because fontfile inclusion is only supported by this terminal."
print "\n In addition, this demo needs two font files which are not"
print " included in the gnuplot distribution."
print " On systems with ghostscript they should be found automatically."
print " If not, they can be downloaded from the net:"
print " http://sourceforge.net/projects/gs-fonts/"
print " Please put the files \"p052003l.pfb\" and \"p052023l.pfb\""
print " somewhere they are found, e.g. into the working directory."
pause -1 "Hit return to continue"
#
      xmin=-270.
      xmax=270.
      ymin=-1.1
      ymax=1.1
#
reset
set terminal push
set terminal postscript enhanced linewidth 2 'Times-Roman' 22 \
    fontfile 'p052003l.pfb' fontfile 'p052023l.pfb'
set output 'fontfile.ps'
unset autoscale
set xr [xmin:xmax]
set yr [ymin:ymax]
#
save_encoding = GPVAL_ENCODING
set encoding iso_8859_1
set format y '%.1f'
set label 'Times-Roman: {/Times-Roman abcdefghABCDEFGH }' at graph 0.05,0.6 left
set label 'URWPalladioL-Roma: {/URWPalladioL-Roma abcdefghABCDEFGH }' at graph 0.05,0.5 left
set label 'URWPalladioL-Ital: {/URWPalladioL-Ital abcdefghABCDEFGH }' at graph 0.05,0.4 left
set xlabel '{/URWPalladioL-Ital x} / '
set ylabel '{/URWPalladioL-Ital y}'
plot sin(pi/180.*x) title '{/URWPalladioL-Ital y} = sin {/URWPalladioL-Ital x}'
print "\n Now have a look at the file fontfile.ps"
set output
set terminal pop
set encoding save_encoding
reset