36
37
<chapter id="x-drivers">
37
<title>The PLplot X Driver Family</title>
40
There are several drivers for working with the MIT X Windows
41
system. Beginning with PLplot 5.0, the following drivers are supported.
44
<sect1 id="xwin-driver">
45
<title>The Xwin Driver</title>
53
<sect1 id="tk-driver">
54
<title>The Tk Driver</title>
38
<title>The PLplot Display Driver Family</title>
41
Drivers that provide screen displays are described in this chapter.
42
Each of the drivers has a list of options, and these may be set as
43
outlined in <xref linkend="arguments" />.
47
<!-- ================================================================== -->
50
<sect1 id="xwin-driver">
51
<title>The Xwin Driver (X-Windows)</title>
54
The Xwin driver draws plots in an X-window. Although some of the
55
newer features are not supported, it remains the reference driver
60
Plots are displayed one page at a time. The pager is advanced by
61
pressing the Enter key, and may only be advanced in the foreward
66
Anti-aliasing is not supported, and the Xwin driver is not
71
The available driver options are:
74
sync: Synchronized X server operation (0|1)
77
nobuffered: Sets unbuffered operation (0|1)
80
noinitcolors: Sets cmap0 allocation (0|1)
83
defvis: Use the Default Visual (0|1)
86
usepth: Use pthreads (0|1)
93
<!-- ================================================================== -->
96
<sect1 id="gcw-driver">
97
<title>The GCW Driver (Gnome 2)</title>
100
The GCW driver draws plots into a tabbed Gnome window. The driver's
101
features and user interface are described in
102
<xref linkend="gcw-driver-basics" />. A specialized API allows
103
interaction with the driver, and this is described in
104
<xref linkend="gcw-driver-api" />.
107
<!-- GCW Driver Basics -->
109
<sect2 id="gcw-driver-basics">
110
<title>GCW Driver Basics</title>
113
The GCW driver plots each page into an individual tab within
114
a Gnome window. The user interface built into the window allows
115
a variety of actions. In particular, pages can be saved to files
116
with extensions .ps, .psc, .png, .jpg, and .gif, which correspond
117
to PLplot output driver devices described in
118
<xref linkend="output-drivers" />.
122
The GCW driver supports anti-aliasing and is unicode enabled.
126
There are a variety of hot keys that may be used in the user interface:
128
<listitem><para>Arrows : Change page</para></listitem>
129
<listitem><para>+ : Zooms in</para></listitem>
130
<listitem><para>- : Zooms out</para></listitem>
131
<listitem><para>= : Zooms to 100%</para></listitem>
132
<listitem><para>q : Quits</para></listitem>
137
The available driver options (used with the
138
<parameter>-drvopt</parameter> command-line argument) are:
141
text: Use TrueType fonts (0|1); default 1
144
pixmap: Use pixmap for plotting lines and shades (0|1);
148
hrshsym: Use Hershey symbol set (0|1); default 0
154
The <parameter>text</parameter> option toggles between TrueType and
155
Hershey fonts. The Hershey fonts provide a reference implementation
156
for text representation in PLplot.
160
The <parameter>hrshsym</parameter> option is used to indicate that
161
symbols should be drawn using the Hershey fonts. This is
162
useful when plots need to be saved to PostScript files, because
163
the Type I fonts used by the PS and PSC devices do not support all
168
Most of the command-line arguments described in
169
<xref linkend="arguments" /> are also supported. Some key arguments
170
for use with the GCW driver are:
173
geometry geom: Sets page size, in pixels (e.g. -geometry 400x300)
176
nopixmap: Disables pixmap usage for plotting lines and shades
179
portrait: Sets portrait mode (both orientation and aspect ratio)
185
The <parameter>nopixmap</parameter> option disables the use of
186
the internal pixmap for drawing lines and shades, which will
187
normally appear somewhat pixelated. The
188
<parameter>nopixmap</parameter> option directs the driver to use
189
anti-aliased vector graphics instead, resulting in higher quality
190
plots but rendered at a slower speed. This option does not affect
191
the quality of plots saved from the GCW user interface. Note that
192
the TrueType fonts are always anti-aliased.
198
<!-- GCW Driver API -->
200
<sect2 id="gcw-driver-api">
201
<title>GCW Driver API</title>
204
The GCW driver provides an additional API that allows for a higher
205
degree of control by the user. The C API is described below, and
206
bindings to other languages are described in
207
*** NEEDS DOCUMENTATION ***.
211
The function prototypes are defined in <filename>gcw.h</filename>.
212
Programs that need access to this API must be linked against the
213
libplplotgnome2d library rather than libplplotd. This is most easily
214
accomplished using pkg-config; i.e.,
217
gcc x01c.c -o x01c `pkg-config --cflags --libs plplotd-gnome2`
220
You may need to remind pkg-config where to look for the
221
plplotd-gnome2 file installed by PLplot; e.g.,
224
gcc x01c.c -o x01c `PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config --cflags --libs plplotd-gnome2`
229
<!-- gcw_use_text -->
231
<sect3 id="gcw_use_text">
232
<title><function>gcw_use_text</function>: Sets font usage.</title>
235
<funcsynopsis><funcprototype>
236
<funcdef><function>void gcw_use_text</function></funcdef>
237
<paramdef><parameter>use_text</parameter></paramdef>
238
</funcprototype></funcsynopsis>
242
Sets whether TrueType text or Hershey fonts are used.
248
<parameter>use_text</parameter> (<literal>PLINT</literal>, input)
251
1 for TrueType fonts (default), 0 for Hershey fonts.
259
<!-- gcw_use_pixmap -->
261
<sect3 id="gcw_use_pixmap">
262
<title><function>gcw_use_pixmap</function>Sets pixmap usage.</title>
265
<funcsynopsis><funcprototype>
266
<funcdef><function>void gcw_use_pixmap</function></funcdef>
267
<paramdef><parameter>use_pixmap</parameter></paramdef>
268
</funcprototype></funcsynopsis>
272
Sets whether lines and shades are drawn to a pixmap,
273
or instead as vector graphics.
277
Lines and shade drawn to the pixmap may appear pixelated.
278
Vector graphics are fully anti-aliased, but are rendered at a
285
<parameter>use_pixmap</parameter>
286
(<literal>PLINT</literal>, input)
289
1 to use pixmap (default), 0 for vector graphics instead.
301
<!-- ================================================================== -->
305
<sect1 id="tk-driver">
306
<title>The Tk Driver</title>
57
309
is the prototype of a whole new interaction paradigm. See next
315
<!-- ================================================================== -->
318
<sect1 id="aqt-driver">
319
<title>The AquaTerm Driver (Mac OS X)</title>
322
The AquaTerm driver is a Mac OS X specific driver that is used with
323
the AquaTerm Graphics Terminal. It is unicode enabled. Text, lines
324
and shades are anti-aliased.
328
There are no options...
332
<!-- ================================================================== -->
335
<sect1 id="wxWidgets-driver">
336
<title>The wxWidgets Driver (Linux, Mac OS X, Windows)</title>
339
The basic wxWidgets driver's features and user interface are described
340
in the section called 'Driver Basics'. The file
341
drivers/README.wxwidgets describes how you can use the PLplot library
342
within your wxWidgets application.
345
<sect2 id="wxWidgets-driver-basics">
346
<title>wxWidgets Driver Basics</title>
349
The wxWidgets driver plots in a Frame provided by the wxWidgets
350
library. The driver is quite complete but lacks many of the GUI
351
features of the TK or GCW drivers. All plots are available at once
352
an one can switch between all plots by pressing Alt-n. The
353
application can be quit with Alt-x. These functions are also
354
available in the menu. After the last plot one will advance again
355
to the first plot. Anti-aliasing is supported and and the wxWidgets
356
driver is unicode enabled. It is also possible to address the
357
wxWidgets driver from within a wxWidgets application - this is
358
described in the next section.
362
The available driver options (used with the
363
<parameter>-drvopt</parameter> command-line argument) are:
366
text: Use TrueType fonts (0|1); default 1
369
smooth: switch on/off anti-aliasing (0|1); default 1
375
The text option toggles between TrueType and Hershey fonts. The
376
Hershey fonts provide a reference implementation for text
377
representation in PLplot.
381
The smooth option will turn on or off text smoothing for True
382
Type fonts. This will increase the time for a plot considerably.
388
<!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
65
391
<chapter id="output-drivers">
66
392
<title>The PLplot Output Driver Family</title>
69
There are several drivers which produce output files to be displayed by
70
another system. Beginning with PLplot 5.0, the following drivers are
395
Drivers which produce output files are described in this chapter.
396
Each of the drivers has a list of options, and these may be set as
397
outlined in <xref linkend="arguments" />.
401
<!-- ================================================================== -->
74
404
<sect1 id="postscript-driver">
75
405
<title>The Postscript Driver</title>
78
makes .ps output, how cool.
408
The Postscript driver produces publication-quality postscript
409
output. The driver provides two devices: the ps device for
410
black-and-white plots, and the psc device for color plots.
414
This driver is unicode enabled, and PostScript Type I fonts are used.
415
Type I fonts do not have all of the available unicode symbols
416
represented. For this reason, Hershey fonts are used for drawing
417
symbols by default, unless specified otherwise using the driver options.
421
The available driver options are:
424
text: Use Postscript text (0|1); default 1
427
hrshsym: Use Hershey fonts for symbols (0|1); default 1
435
<!-- ================================================================== -->
438
<sect1 id="gd-driver">
439
<title>The GD Driver</title>
442
The GD driver produces png, jpeg, and gif images, using devices by
443
the same name. The GD driver is unicode enabled. Text is
444
anti-aliased, but lines and shades are not.
448
The available driver options are:
451
optimise: Optimise PNG palette when possible
454
def_black15: Define idx 15 as black. If the background is
455
"whiteish" (from "-bg" option), force index 15 (traditionally
459
swp_red15: Swap index 1 (usually red) and 1 (usually white);
460
always done after "black15"; quite useful for quick changes to
463
<listitem><para>8bit: Palette (8 bit) mode</para></listitem>
464
<listitem><para>24bit: Truecolor (24 bit) mode</para></listitem>
465
<listitem><para>text: Use driver text (FreeType)</para></listitem>
467
smooth: Turn text smoothing on (1) or off (0)