Printing in
vnmrJ
Printing in vnmr software had been traditionally done with commands until
recent years. These commands, like all vnmr commands, are still being widely
used and are compatible with new vnmrJ software despite constant changes to the
interface. Varian's WYSIWYG plotting program, Plot Designer
(accessible from File menu, to be documented separately) is
poorly designed and is difficult to use. While it offers the ability of laying
out several regions (with insets in a main plot area, for example), it still
requires a significant amount of manual command editing for decent laid-out
graphics. Due to the weak graphic design of the printing interface, using the
command option in most cases is faster and more useful. This document
summarizes basic, mostly command driven printing in vnmrJ.
For publication with more complex and detailed spectrum and text layout, the
best route is to edit and combine individual spectra in postscript or pdf
format with a vector-based program such as Adobe
Illustrator. Unlike .jpg or other image files, the .ps or .pdf
files have no resolution loss and every object in the graph is editable. You
can overlay several .ps and .pdf files because they are transparent.
Macros will be written to allow printing with several common layouts
soon. But manual command editing will still be needed for customized
layout.
Printing example: hardcopy or graphic file (.ps, .pdf or .jpg)
Printout
file
- Turn off WYSIWYG by typing wysiwyg='n'
- Process data: integrate, pick peaks, adjust scaling, expand, etc.
- If you only want to print integral values with brackets under the
spectrum and do not want to show the integral lines cutting across the
peaks:
- Type inmod='off' or click the
Hide Integral button.
- If you want to show both integral lines and values, type
intmod='partial' or click the Show Integral
Regions button.
- Select plotter:
- Go to File->Printers and
select one of the plotters under Plotter. You can also
type plotter='LetterPlotter' or
plotter='HiRes11x17'.
- The width of the plot may change on-screen after
plotter change. Type full to expand it to fill screen.
- For file output in .jpg format,
the resolution is 5100x3300 pixels for HisRes11x17 plotter
and 3300x2550 pixels for LetterPlotter.
- Note changing plotter will change the aspect
ratio of the plot accordingly.
- For hard copy, modify and enter the following
command:
- vp=12 pl pscale pir
pll(wcmax-60,wc2max-5) page
- If no integral values are to be shown, omit
vp=12 or type vp=0 to bring baseline back
down.
- wcmax and
wc2max are the max width and height of the plotter paper.
Adjust the offset values as needed. They are used to control the
positioning of the peak list.
- For output to a file in postscript (.ps), PDF
(.pdf) or jpeg (.jpg) format, supply the
page command with a file name with proper extension.
Enter:
- pwd (print current working
directory, usually home, to see where the output will go)
- vp=12 pl pscale pir
pll(wcmax-60,wc2max-5) page('compound1.pdf') or
- vp=12 pl pscale pir
pll(wcmax-60,wc2max-5) page('compound1.jpg')
or
- vp=12 pl pscale pir
pll(wcmax-60,wc2max-5) page('compound1.ps')
- To check output file:
- Open the home folder on the Desktop and browse
to find the file. Most often, double clicking the file will open it with a
default application.
- Alternatively, open a Linux terminal window by
right clicking in Desktop and select Open Terminal, or open a terminal
through the menu items in an open folder. Type the following commands, with
your file names, in the terminal window:
- ls (to list files)
- kpdf compound1.pdf
- xv compound1.jpg
- xv compound1.ps
- Linewidth adjustment: If you want to change the
linewidth of the spectrum, supply the page command with a
number from 0 (minimum linewidth) to 20 (maximum linewidth) as the first
argument and re-do the priniting command above. The default linewidth is
0.
- page(1) (for printing
hardcopy)
- page(0,'compound1.pdf')
(minimum linewidth)
- page(1,'compound1.pdf')
(slightly thicker linewidth)
- To transfer the plot files, you can simply e-mail yourself using the
browser or use a FTP program (such as winSCP on windows)
with remote login.
NOTE:
- You can also print to file or preview or a hardcopy via vnmrJ's graphic
window: Process->Plot. Each button usually corresponds
to a command but in some cases differs with unknown effect. One example is
the Plot Integrals button that seems to always draw
integral lines regardless the setting of intmod. This
interface appears to be buggy, particularly with paper size.
Common printing commands and parameters in vnmrJ
Note most printing commands start with the letter p (i.e.
pscale) ; most corresponding display commands (i.e.
dscale), but not all, start with d.
- pl - print 1D spectrum
- pscale - print spectrum scale in ppm or Hz, depending on
the parameter axis
- pscale(vp-10) - print scale
10mm below the current spectrum position (vp). Default scale is
vp-5 (5mm below spectrum base)
- pscale(20) - print scale at
20mm along Y-axis.
- pir - print integral below spectrum with horizontal
value. Needs vp=12 or larger
- piv - print integral below spectrum with vertical value.
Needs vp=25 or larger
- pirn - similar to pir, except the sum
of the integrals is normalized to ins
- pivv - similar to piv, except the sum
of the integrals is normalized to ins
- ppf - print peak frequencies over spectrum for peaks
above threshold th, in unit set by
axis
- pll - print peak list in table format
- pll(x,y) - print peak list
starting at (x,y) coordinates with origin at bottom left corner
- pap - print a parameter list of "all" parameters
- pap(x,y) - printing list
starting at position x and y in mm along the X- and Y -axis of paper.
- Example: pap(10,wc2max-5)
- ppa - print critical parameters in plain English
- ppa(x,y) - similar to
pap(x,y)
- pltext - print user text/comment file (text)
- pltext(x,y) - print text file
with first line starting at (x,y) coordinates in mm. Default is upper, left
corner.
- pltext(x) - start at x along
X-axis and the top of Y- axis.
- pltext(wcmax-70) - starts at
70mm from the right edge
- page - submit plot for actual printing. Usually last
command in printing command chain. With a file name and proper extension
(.ps), it generates a postscript file rather than sending
to the printer. The first argument can be a linewidth parameter (from 0 to
20).
- pl pscale pir page
- page('clear') - clear all
previous plotting commands
- pl pscale pll page('myplot.ps')
- print into a postscript file named myplot.ps under curent directory.
- pl pscale page(2) - print
hardcopy with thicker linewidth of 2
- left - set display and plot area to left half of window
or paper
- right - set display and plot area to right half of
window or paper
- center - set display and plot area to center the
plot
Printing related parameters
- axis - axis label. axis='ppm' or
axis='h' set axis to ppm or Hz. axis='k'
sets axis to kHz.
- vp - vertical position (in mm) of spectrum from bottom
of display or plotter.
- vp=12
- vp=vp+50 moves spectrum up 50mm
from current position
- vs - vertical scale of spectrum.
- vs=vs*2 doubles peak
height.
- wcmax - maximum width of printing chart (X-axis). fixed
for each plotter. Useful to define print position from right edge.
- wcmax=250 for 8.5x11 paper
(letter)
- wcmax=400 for 11x17 paper
- wc2max - maximum height of printing chart (Y-axis).
fixed for each plotter. Useful to define print position from top edge.
- wc2max=180 for 8.5x11 paper
- wc2max=240 for 11x17 paper
- wc - width of chart, from 5 to
wcmax.
- sc - position of the start of the plotting position,
from 0 to wcmax, (chart) with respect to the right edge of
the plotter
- io - offset of integral with respect to the spectrum,
from 0 to 200 mm.
- intmod - integral line display/plot mode.
- intmod='no' no integral line
displayed
- intmod='partial' displays every
other integrals (only peaks and no baseline)
- inmod='full' displays all
integral regions
- plotter - name of plotter
- plotter='LetterPlotter'
- wysiwyg - global parameter that controls whether current
window display depends on plotter size.
- wysiwyg='y' (makes the display
size depend on plotter setting)
- wysiwyg='n' (gives full display
to fill window size. Recommended)
- pslw - global parameter defining linewidth of postscript
plot, ranging from 0 (narrowest) to 200 (widest, can only go to 9 on our
plotters). Leave at minimum of 0 and use linewidth control in
page command instead (see above).
Examples
- pl pscale pll(wcmax-60,wc2max-5) pir page
- Print spectrum, scale, peak list (starting in
the upper right corner 60mm in from right edge and 5mm in from top edge)
and integrals
- pl pscale ppf pir page('~/myplot.ps')
- Print spectrum, scale, peak labeling next to
peaks and integrals. Send plot to a postscript file myplot.ps under home
directory
H. Zhou Dec
2010