XForms: Problems with xyplot postscript dump

Ivan Powis (pczip@chemistry.nottingham.ac.uk)
Thu, 16 Oct 1997 15:53:39 BST

To subscribers of the xforms list from Ivan Powis <pczip@chemistry.nottingham.ac.uk> :

I've been trying out fl_object_ps_dump() and noted a few problems, these
can be reproduced by edits to the xyplotover demo:

(1) if the xyplot label is positioned outside the plotting box, say
fl_set_object_lalign(obj,FL_ALIGN_BOTTOM_RIGHT);

then on the ps dump the text will appear centered over the box. While
this is undesirable, my personal view is that I'd prefer text outside
the box not to appear in the postscript file anyway. Maybe an
additional control in FLPS_CONTROL to enable/disable this??

(2) if I have used
fl_set_xyplot_alphaytics(fd_fff->xyplot,"","");
to turn off drawing of the y axis (I do this because in some instances
my y units are arbitrarily scaled anyway and it removes clutter from the
plot) then in the psdump the straight line forming the X axis is misplaced,
to the top of the plot, while the tick marks and x axis label are correctly
positioned at the bottom. There is no such problem in the on-screen form.

(3) If I have enabled double buffering of the plot
fl_set_object_dblbuffer(fd_fff->xyplot,TRUE);
then the actual data in the ps dump appears to be plotted out relative
to the origin of the top form, not that of the xyplot box. To see this
change the xyplotover demo form:

fdui->fff = fl_bgn_form(FL_NO_BOX, 370, 710);
obj = fl_add_box(FL_UP_BOX, 0, 0, 370, 710, "");
fdui->xyplot = obj = fl_add_xyplot(FL_NORMAL_XYPLOT, 10, 420, 350, 260,
"An XYPlot");

this makes the main form taller with the xyplot at the bottom. Then look at
the dumped postscript. The data curves are floating 'up in the air'
above the axes and (if drawbox is enabled) the xyplot box. Again there is
no such problem with the visible on-screen plot.

(4) This point is relatively minor, but it concerns definition/documentation
of the boolean controls in FLPS_CONTROL stucture. It is rather ambiguous
whether these switches (eps, drawbox etc) use the C definition
of non-zero for ON or whether it is a specific test for 1=ON anything else
OFF. Really why I ask this is that I notice that after flps_init()
eps=0 auto_fit=1 drawbox=-1 (the latter is apparently OFF, and requires
drawbox=1 to function)

HPUX and SUNOS 0.87.3 library

Ivan

--
-------------------------------------------------------------------------+
    ___  ___/   _  __ /  Ivan Powis                TEL: +44-115-951-3467 |
        /         /   /  Department of Chemistry   FAX: +44-115-951-3562 |
       /         /  _/   University of Nottingham                        |
      /         ___/     Nottingham NG7 2RD                              |
     /         /         UK                                              |
    /         /                      pczip@chem.nott.ac.uk               | 
_______/  ____/                      http://www.chem.nott.ac.uk/IP.html  |
-------------------------------------------------------------------------+

_________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuf2.usuhs.mil or see http://bob.usuf2.usuhs.mil/mailserv/xforms.html Xforms Home Page: http://bragg.phys.uwm.edu/xforms List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/