Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!rutgers!mcnc!duke!egr.duke.edu!dukee!amr From: amr@dukee.egr.duke.edu (Anthony M. Richardson) Newsgroups: comp.sys.amiga Subject: Re: AmigaPlot by James White Message-ID: <1040@cameron.egr.duke.edu> Date: 4 Aug 90 18:33:51 GMT References: <44@ncuug.UUCP> Sender: news@egr.duke.edu Distribution: usa Lines: 61 I doubt that this has enough interest to warrant posting, but mail bounced. Gary asked some questions about PLPLOT: From article <44@ncuug.UUCP>, by garyw@ncuug.UUCP (Gary Whicker): > Now for some questions, since I'm working on my front-end for it.: > > - How can you change the size of the printed graph from within the > program using PLPLOT? Right now the only way I can figure is to size > the window, do an IFF save, and load it into a paint program to print > it out. Another kludge is to go into prefs and play with the pixel limits > for the printer. Also, the print options that say (landscape) and > (portrait) end up printing tiny. Can this be adjusted? Right now I am > just using the bitmap dump. If you select the PLPLOT preferences driver, PLPLOT uses the preferences selected density and page size limits and ignores most of the other preferences stuff. If you have selected "ignore" in the page size limit options then a full page graph is produced. The other options operate as described in the Enhancer manual. Only "ignore" and "bounded" preserve aspect ratio. (Usually unimportant unless x and y must have the same scaling as for pie charts or polar plots). I normally set the page size limit to a specific size (say 4"x4") and then let PLPLOT create a plot of exactly that size. (This also requires less memory than a full page graph.) You're actually asking about the "Print" menu selection from the Amiga window driver. This uses the same menu options as the preferences driver above, but does not maintain aspect ratio. Going straight to the preferences driver produces the highest quality output. In answer to your question, "it's in there". PLPLOT supports more than just the preferences pixel setting limits. It may not be convenient and a better solution would be to prompt the user for the size and then to change the preferences options while printing the graph. (Or maybe one of the multiprefs type programs?) > - When clearing a current plot to do a new one, I end up having to click > the close gadget on the current plot window before the new one comes > up. Is there a way to automate this? This is the way the Amiga window driver is designed to work. I thought this was the best way to do it. You can hack the beepw() routine in amiga.c so that, instead of calling eventwait() to wait for a "close" event, you do something else. > - In the PLPLOT introduction it mentions the ability to make bar, and pie > graphs. I can see how to do a bar graph fairly easily, but I'm stumped > on how to get pie graphs setup. Any suggestions? Just use plenv() to set up the graphics environment for a one-to-one aspect ratio and then use plfill() to fill in sections of the pie. example13 in the examples directory shows how to do this. > Thanks for any answers you might be able to give me. And thanks for a nice > library that will finally let my Amiga do some serious plotting for me. You're welcome. I hope I've helped. I look forward to trying out your program! Tony Richardson amr@dukee.egr.duke.edu