TFQA: Tools for Quantitative
Running TFQA Graphics Programs
The TFQA graphics programs (KMPLT,
DIVPLT, LDPLT, BAYES, SCAT, and FORD) do not run
well under Windows XP (printscreen doesn't work) and do
not run directly, under Windows 7 or 10. They can be made
to run well using DosBox
a freeware emulator of 16 bit Windows. It is a bit of
extra work to set up but does work fine. You only need to use this for the
graphics programs--KMPLT, DIVPLT, LDPLT, BAYES, SCAT,
and FORD not any of the others.
Setup to Run the Graphics Programs
Downloading DosBox (freeware)
In Windows 10, open the Run app and enter "cmd'
in the Open: box and click OK. In the Command window
type "dir/x" and press Enter. That will give you the
short file name for each folder and file in the current
directory. You can change directories by using the
"cd" command with the regular long paths, e.g. "cd
c:\users\kintigh\dropbox (personal)". You need to
construct a path by assembling all the short file name
pieces. Remember that the pieces that are so-called
8.3 filenames with no spaces and special characters are OK
as both long and short file names. Thus for
c:\users\kintigh\dropbox (personal)\pascal\project folder
the short file name path might be
c:\users\kintigh\dropbo~1\pascal\projec~2 . Sorry,
they keep making it harder.
You can search In Windows 7, the easiest way to do this is use Windows Explorer (Start>All Programs>Accessories) to navigate to the folder that has your files. Then hold down the shift key and right click on the folder name in the folder tree on the left of the window. That will bring up a context menu from which you should choose "Open Command Window Here". This will open up a black command window with a prompt showing you the current folder's path followed by a >, e.g., in Windows 7 something like C:\Users\Your Name\Documents\Your Folder.
In XP, if you didn't install CmdHere as a part of the TFQA installation, you will want to do it now (1 time only). The free Microsoft CmdHere utility can be installed (run) or downloaded (save) from the Microsoft Powertoys web site. Once it is installed (double click on CmdHere.exe if you downloaded it), it is available on your computer all the time. Use Windows explorer to navigate to the folder with your data files, and then, with the folder (not a data file) highlighted, you right click and select "Open Command Window Here". This will open up a black command window with a prompt showing you the current folder's path followed by a >, e.g., in XP it might be something like C:\Documents and Settings\your user name\My Documents\your folder
Now here is the trick. In the command widow at the prompt
type command (not
cmd) and press Enter. The prompt in the command window
changes to the short file name version, in my case, I see
in XP a change from
Running TFQA Graphics Programs
Now that you have done the setup, it is easy. To run one
of the graphics programs double click on the DOSBOX icon on your desktop (or from
the DosBox Folder on your start menu). That will open a
new black command window in which the graphics programs
However, before you get going, you will need to do one additional thing. The graphics programs do not deal with ordinary Windows file names. File names used by these DOS programs are restricted, at most, 8 character file names (with no embedded spaces or special characters allowed except "_") followed, optionally, by a period and a 3 character extension (e.g. if you have a file called my site data.plt change it to mysite.plt or something else without spaces or special characters and with no more than 8 characters plus a period and a 3 character extension.
If you have files you want these graphics programs to read that don't meet these DOS conventions, you must rename them (e.g. using Windows Explorer) so that they do. Because the program interface always prompts for file names that you have to type (rather than selecting them from a menu) and because several key programs (divers, kmeans, and lden) interact with plotting program counterparts (notably DIVPLT, KMPLT, and LDPLT), you will want to stick with relatively short file names with 3 character extensions. Better yet, just use the DOS conventions of up 8 character file names(with no embedded blanks or special characters except underscore), followed by a 3 character extension.
Remember that if you change analysis folders you will need to reedit the DOSBOX configuration file to change to another folder.
If this is working, you can delete the DosBox setup file.
In most cases you won't be able to directly print the graphics you see on the screen directly from the TFQA graphics programs (KMPLT, DIVPLT, LDPLT, BAYES, SCAT, and FORD). There are several solutions, however.
The PrintScreen Approach
If you use DOSBOX you can use PrintScreen with the graphics programs very nicely from Windows XP, Vista, and Windows 7. PrintScreen will produce lower quality graphics than printing the HPGL files from another application but will be handier most of the time.
While a plot is displayed, you can press <Shift><PrintScreen> or better <alt><PrintScreen> for only the active window in Windows 7. This sends the screen image (which is at a much lower resolution that the HPGL generated plot discussed below) to the clipboard (see http://windows.microsoft.com/en-US/windows-vista/Take-a-screen-capture-print-screen). You can then Paste the clipboard into a graphics application or a graphics box of a word processing program. You may have to Invert the image to make it Black-on-White rather than White-on-Black. You can then save it in another form and bring it into other applications or print it from the one you are using.
A better, general purpose, solution that allows you to draw a window around the portion of the whole desktop that you want to copy is provided by Gadwin PrintScreen (free).
Saving Graphical Output and Printing from Another Program
Generally you will either want to use Print Screen (as above) or will want to run the plotting programs and view the output on the screen to decide which ones you want to print and then rerun those particular plots saving output to a file (one graphic per file). You can then import these files and then print them from another application. That is, you want to say yes,you want to plot the results to a plotter or printer and that the output should go to a [F]ile. When prompted, supply a file name with an .HPG extension. This file can then be imported into word processing or graphics programs. The graphic output of the programs is an ASCII file in HPGL (Hewlett Packard Graphics Language). That language is turned into graphics by a plotter or an HP PCL printer.
Word Perfect, Corel Presentations, Corel Draw and many other graphics programs will import HPGL files very nicely. (If Word Perfect does not give the option of importing HPGL files you need to rerun the install program and install the HPG conversion filters; you should not need to reinstall the whole program). Microsoft does not supply an HPGL graphics filter with Word 2003 but makes one available through their web site that works with Word 2003 and all 32 bit versions earlier versions of Word--see http://support.microsoft.com:80/support/kb/articles/Q196/5/06.asp. However, this filter does not work with Word 2007 and Microsoft has offered no replacement. Neither the Corel nor the Word conversions are perfect but they produce quite acceptable plots. To be safe you should check the printed results against what appears on the screen.
ViewCompanion Standard (http://www.softwarecompanions.com/viewcomp.html; free trial; education users may wish to inquire about educational pricing) will allow you to view the HGPGL files, to convert them to a great variety of other formats including JPG, and to print them directly. When you open the file, the default line style may be very thin, but you can modify these settings. If you want to print it with thicker lines:
Click on Tools>Pen Table
Click on pen 1 in the small window that opens, making sure that it is highlighted (if it isn't highlighted nothing happens)
Change the width below the box, e.g., to .02
Click the Apply button
Make sure the box that says "Use Pen Table" is checked (it should be checked automatically)
Click the OK button
Printing Directly to a HP Laserjet Printer or Plotter (Generally you can't)
Graphics can only be directly printed from TFQA programs that produce full screen graphics (KMPLT, DIVPLT, LDPLT, BAYES, SCAT, and FORD) if all three of the following conditions are met: (1) programs are running under Windows 95, 98, or 2000; (2) the printer is connected directly to the computer on which the programs are run; and (3) the printer implements HPGL (most HP Laserjet printers do). Usually, you must save each graphical output you want printed to a file (use a .hpg extension) and print the files from another program (more on printing from these files below).
If all of the above conditions apply, you may be able to print graphics directly on a printer from the toolkit to a HP Laserjet. Many newer Laserjet models can work both in PCL and Postscript mode and you can have the same printer set up both ways on your computer simultaneously. You want to print to the PCL printer. To print the graphics directly, you will need to send the output directly to the printer. However, under Windows 95 or Windows 98, you will need to tell the printer to capture the DOS printer port output. This has to be done only once, do Start>Settings>Printers. Then right click on the (networked or otherwise) HP PCL (not Postscript) printer. Click on the Details Tab, then click on Capture Printer Port. Make sure the scroll bar is at the top. If LPT1 is associated with this printer, it is already set up. Otherwise type in, below LPT1, the printer address shown on the previous screen, e.g., \\networknode\HPPrinterName\. Check the box that says "Reconnect at Logon". Then click OK until you get back to the desktop. With some networked printers, this approach may not be possible. If not, you will need to print the output from a Windows application.
If the printers are set up properly, all you have to do is run the program from a Command Prompt window as described above. Tell the program, Yes you want to Plot the results to a plotter or Laserjet printer, that the HPGL output should go to PRN, and that the HP Laserjet or Plotter Paper Size is L for Laserjet. Then, just before it produces the plot, it asks you if you want to Plot the output, reply Yes. This sends the output to the printer.
Creating Graphics from the Data
It is a lot more trouble, but you can extract the data necessary to create the plot from the PLT file. For example, if you look at the .PLT file produced by Divers (not the .HPG file produced by DivPlt that actually contains the plot) you will see that it contains all the data needed to create the plots. You can read that data into a statistics or graphing program and use it to create plots. For Divers, the composition of the .plt file is as follows. (You won't need all of this information):
for each element, the element proportion
Page Last Updated: 1 April 2020