changing scale of ticks for a graph

Ronald Michaels ron at phenotypescreening.com
Tue May 5 23:29:07 CEST 2009


Hi - 

New member Ron here.  I like the new graphics package; however, I am
having a little trouble understanding how it works.

Using Scilab v.5.1.1 on 64 bit Linux

I wish to make a histogram using the hist3d() function.  I would like
the y axis to run from 0 to 36 with subdivisions of 6 units.  Below is
some code that takes me most of the way, but it involves a redefinition
of data_bounds that results in subdivisions of 6 units.

I would appreciate having someone show me the correct way to get y axis
subdivisions of 6 units and to end the y axis at 36.

// start Scilab code

clear
shape = rand(14,36);
size(shape)
shape_rev = [shape(:,19:36) shape(:,1:18)];
hist3d(shape_rev);
a=get("current_axes");
a.data_bounds=[0,0,0;14,30,10]; // x,y,x;x,y,z set y to 0 - 30
a.y_ticks.locations=[0;6;12;18;24;30;36]; // works set to 30
a.y_ticks.labels=["-90";"-60";"30";"0";"30";"60";"90"];// works
a.data_bounds=[0,0,0;14,36,10]; // reset y to 0 - 36
a.rotation_angles=[40,30];

// end Scilab code

Thanks

Ron





More information about the users mailing list