Editing
Graphics development with vplot
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Being tricky about the order things are plotted== The external variable <syntaxhighlight lang="c"> extern int (*genreader) (); </syntaxhighlight> can be changed in dev.open to point to your own routine for processing input files. You should only need to change this variable if for some reason you want to be able to change the order or way in which input files are handled, or if you want to know the actual file names of the input plot files. (You might find this handy if you are creating an interactive vplot editor, for example.) The default input file handling routine, which is what you get if you ignore this section of the documentation, is the following. Frontend already does the job of finding all the input files, verifying that they exist, and opening them for reading. <syntaxhighlight lang="c"> gen_do_dovplot (nn, inpltin, innames) int nn; FILE ** inpltin; char innames[][MAXFLEN+1]; { int ii; for (ii = 0; ii < nn; ii++) { pltin = inpltin[ii]; strcpy (pltname, innames[ii]); dovplot (); fclose (pltin); } } </syntaxhighlight> "Nn" is the number of input files. "Inpltin" is an array of nn stream pointers each of which point to an open (but unread-upon) input stream. "Innames" is the corresponding array of strings giving the associated name of the input file for each of the streams in inpltin. The external integer "buffer_input" can be set to NO in dev.open to assure that all the input streams are unbuffered. The external integer "allow_pipe" can be set to NO in dev.open to assure that all the input streams are seekable on. It is possible to change most variables set by command line arguments between calls to dovplot without ill effect. There are comments in init_vplot at the end of the section of code where command line arguments are processed listing which variables have been explicitly set up to be changeable in this way. Variables controlling the mapping between the device's and vplot's coordinate system can also be changed, but the subroutine "reset_parameters()" in frontend must be called afterwards to reinitialize all the related variables that may need it. ./filters/vplib/vpdovplot.c is an example of a routine that makes 2 passes through a vplot file, doing things differently the second time around.
Summary:
Please note that all contributions to Madagascar are considered to be released under the GNU Free Documentation License 1.3 or later (see
My wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
English
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Getting Madagascar
download
Installation
GitHub repository
SEGTeX
Introduction
Package overview
Tutorial
Hands-on tour
Reproducible documents
Hall of Fame
User Documentation
List of programs
Common programs
Popular programs
The RSF file format
Reproducibility with SCons
Developer documentation
Adding programs
Contributing programs
API demo: clipping data
API demo: explicit finite differences
Community
Conferences
User mailing list
Developer mailing list
GitHub organization
LinkedIn group
Development blog
Twitter
Slack
Tools
What links here
Related changes
Special pages
Page information