xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XForms] xyplot axes labels wrong resizing


From: Michal Szymanski
Subject: [XForms] xyplot axes labels wrong resizing
Date: Mon, 26 Nov 2012 14:37:17 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

It seems there is a bug in xyplot routines. If a form containing
xyplots gets resized, the axes labels do not move in accordance
with the whole object. This is perfectly seen for the "x" axis but it
might be because the "y" axis label is placed at left and teh axis
itself moves a little when the form is resized.

Sample code attached below. Tested on 1.0.94pre12.

regards, Michal

-- 
  Michal Szymanski (msz at astrouw dot edu dot pl)
  Warsaw University Observatory, Warszawa, POLAND

------------------------------------------------------------------

#include <stdlib.h>
#include <forms.h>

FL_FORM *testxy;

FL_OBJECT
        *xy1,
        *xy2;

void
create_form_testxy( void )
{
    FL_OBJECT *obj;
    if ( testxy )
        return;

    testxy = fl_bgn_form( FL_NO_BOX, 646, 416 );

    obj = fl_add_box( FL_NO_BOX, 0, 0, 646, 416, "" );

    obj = fl_add_box( FL_FLAT_BOX, 0, 0, 646, 416, "" );

    xy1 = obj = fl_add_xyplot( FL_NORMAL_XYPLOT, 20, 20, 460, 150, "" );

    xy2 = obj = fl_add_xyplot( FL_NORMAL_XYPLOT, 20, 190, 460, 150, "" );
    fl_end_form( );

}

void create_the_forms( void )
{
    create_form_testxy( );
}

int
main( int    argc,
      char * argv[ ] )
{
  float x[]={0.0,1.0,2.0,3.0,4.0};
  float y[]={0.2,1.0,0.7,0.1,0.9};
  int np=sizeof(x)/sizeof(float);

  fl_initialize( &argc, argv, 0, 0, 0 );

  create_the_forms( );

  /* Fill-in form initialization code */
  fl_set_xyplot_data(xy1, x, y, np, "", "  JD ", "mag");
  fl_set_xyplot_data(xy2, x, y, np, "", "phase", "mag");
  /* Show the first form */

  fl_show_form( testxy, FL_PLACE_CENTERFREE, FL_FULLBORDER, "testxy" );
  fl_do_forms( );

  return 0;
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]