That pd 'qt 800 600' doesn't work looks like a bug. However, you could call wd 'pmove -1 -1 800 600' before the save to do this programmatically.
On Fri, May 10, 2019 at 10:48 PM Ric Sherlock <[email protected]> wrote: > I have been unsuccessfully trying to programmatically generate PNGs of > Plots of a desired size. > > I can successfully save a plot as a PNG from a jQt session. > > require 'plot' > pd 'reset' > pd */~ i: 10 > pd 'show' > pd 'save png ',jpath '~temp/myplot.png' > > However to get it the size I want I need to display the plot at the desired > size on the screen. The wiki ( > https://code.jsoftware.com/wiki/Plot/Commands) > suggests that using the `qt` command I should be able to set the display > size however this doesn't seem to work and the plot is always displayed at > the default size. > pd 'reset' > pd */~ i: 10 > pd 'qt 800 600' NB. no difference to just 'qt' > > I am able to manually drag the displayed plot window to the desired size > and then run pd 'save png' but would like to be able to accomplish this > programmatically. > > I note that the pd 'canvas 800 600' command and the pd 'pdf 800 600' > commands seem to work OK - but they don't provide me with a PNG! > > Is there a bug in pd 'qt'? > > > > > > > > > pd 'canvas 800 600' > > plot > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
