Adjust Font sizes
Pierre Marechal [Fri, 29 Aug 2008 13:09:49 +0000 (13:09 +0000)]
scilab/modules/graphics/demos/bar/bar.dem.sce
scilab/modules/graphics/demos/misc/misc.dem.sce
scilab/modules/graphics/demos/misc/misc.dem.sci
scilab/modules/gui/demos/cb_uicontrol_plot3d.dem.sci

index 29f0d3b..e90cbd2 100644 (file)
@@ -20,15 +20,15 @@ x=[1 2 3 4 5 6 7 8 9 10 11 12];
 y=[ 13702 16902 22765 ; ..
     13758 19959 21321 ; ..
     16944 23254 24971 ; ..
-    16324 18323 0 ; ..
-    15399 19648 0 ; ..
-    14988 17160 0 ; ..
-    10275 10996 0 ; ..
-    10195 14316 0 ; ..
-    14899 18410 0 ; ..
-    18884 23924 0 ; ..
-    16919 21535 0; ..
-    14759 19979 0];
+    16324 18323 21325 ; ..
+    15399 19648 24176 ; ..
+    14988 17160 22978 ; ..
+    10275 10996 25754 ; ..
+    10195 14316 25128 ; ..
+    14899 18410 33430 ; ..
+    18884 23924 49388 ; ..
+    16919 21535 43048 ; ..
+    14759 19979 33706];
 
 angle = 295;
 
@@ -67,38 +67,38 @@ year2007.bar_width = 0.25;
 
 // Labels drawing
 
-year2005_data = year2005.data;
-year2006_data = year2006.data;
-year2007_data = year2007.data;
-
-year2005_shift = year2005.x_shift;
-year2006_shift = year2006.x_shift;
-year2007_shift = year2007.x_shift;
-
-year2005_width = year2005.bar_width;
-year2006_width = year2006.bar_width;
-year2007_width = year2007.bar_width;
-
-for j = 1:length(year2005_shift),
-  xstring(j+year2005_shift(j)+(year2005_width/3),year2005_data(j,2),string(year2005_data(j,2)),angle);
-  t=get("hdl");
-  t.font_size=2;
-  t.font_style=9;
-end;
-
-for j = 1:length(year2006_shift),
-  xstring(j+year2006_shift(j)+(year2006_width/3),year2006_data(j,2),string(year2006_data(j,2)),angle);
-  t=get("hdl");
-  t.font_size=2;
-  t.font_style=9;
-end;
-
-for j = 1:length(year2007_shift),
-  xstring(j+year2007_shift(j)+(year2007_width/3),year2007_data(j,2),string(year2007_data(j,2)),angle);
-  t=get("hdl");
-  t.font_size=2;
-  t.font_style=9;
-end;
+// year2005_data = year2005.data;
+// year2006_data = year2006.data;
+// year2007_data = year2007.data;
+// 
+// year2005_shift = year2005.x_shift;
+// year2006_shift = year2006.x_shift;
+// year2007_shift = year2007.x_shift;
+// 
+// year2005_width = year2005.bar_width;
+// year2006_width = year2006.bar_width;
+// year2007_width = year2007.bar_width;
+// 
+// for j = 1:length(year2005_shift),
+//   xstring(j+year2005_shift(j)+(year2005_width/3),year2005_data(j,2),string(year2005_data(j,2)),angle);
+//   t=get("hdl");
+//   t.font_size=2;
+//   t.font_style=1;
+// end;
+// 
+// for j = 1:length(year2006_shift),
+//   xstring(j+year2006_shift(j)+(year2006_width/3),year2006_data(j,2),string(year2006_data(j,2)),angle);
+//   t=get("hdl");
+//   t.font_size=2;
+//   t.font_style=1;
+// end;
+// 
+// for j = 1:length(year2007_shift),
+//   xstring(j+year2007_shift(j)+(year2007_width/3),year2007_data(j,2),string(year2007_data(j,2)),angle);
+//   t=get("hdl");
+//   t.font_size=2;
+//   t.font_style=2;
+// end;
 
 // Legend drawing
 
index 9ab1f0d..e62768b 100644 (file)
@@ -10,5 +10,5 @@
 //
 
 my_path = SCI+"/modules/graphics/demos/misc";
-exec(my_path+"/misc.dem.sci");
+funcprot(0);exec(my_path+"/misc.dem.sci");funcprot(1);
 demo_misc();
index c263dd3..5937b39 100644 (file)
@@ -26,19 +26,21 @@ function demo_misc()
        // Parameters
        // =========================================================================
        
-       frame_w      = 200;     // Frame width
-       frame_h      = 330;     // Frame height
+       frame_w              = 200;     // Frame width
+       frame_h              = 330;     // Frame height
        
-       plot_w       = 600;     // Plot width
-       plot_h       = 550;     // Plot height
+       plot_w               = 600;     // Plot width
+       plot_h               = 550;     // Plot height
        
-       margin_x     = 15;      // Horizontal margin between each elements
-       margin_y     = 15;      // Vertical margin between each elements
+       margin_x             = 15;      // Horizontal margin between each elements
+       margin_y             = 15;      // Vertical margin between each elements
        
-       padding_x    = 10;      // Horizontal padding between each elements
-       padding_y    = 10;      // Vertical padding between each elements
+       padding_x            = 10;      // Horizontal padding between each elements
+       padding_y            = 10;      // Vertical padding between each elements
        
-       defaultfont  = "arial"; // Default Font
+       defaultfont          = "arial"; // Default Font
+       frametitle_font_size = 16;      // Title font size
+       text_font_size       = 13;      // Text font size
        
        // Figure creation
        // ========================================================================= 
@@ -66,10 +68,6 @@ function demo_misc()
                "style"               , "frame",...
                "units"               , "pixels",...
                "position"            , [ my_frame_pos_x my_frame_pos_y frame_w frame_h],...
-               "fontname"            , "arial",...
-               "fontunits"           , "points",...
-               "fontsize"            , 13,...
-               "fontweight"          , "bold", ...
                "horizontalalignment" , "center", ...
                "background"          , [1 1 1], ...
                "tag"                 , "frame_control" ...
@@ -84,7 +82,7 @@ function demo_misc()
                "position"            , [ 30+my_frame_pos_x my_frame_pos_y+frame_h-10 frame_w-60 20 ],...
                "fontname"            , defaultfont,...
                "fontunits"           , "points",...
-               "fontsize"            , 14,...
+               "fontsize"            , frametitle_font_size,...
                "horizontalalignment" , "center", ...
                "background"          , [1 1 1], ...
                "tag"                 , "title_frame_control" ...
@@ -106,7 +104,7 @@ function demo_misc()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 1, ...
                "background"          , [1 1 1], ...
                "callback"           , "demo_update_misc",...
@@ -122,7 +120,7 @@ function demo_misc()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 0, ...
                "background"          , [1 1 1], ...
                "callback"           , "demo_update_misc",...
@@ -138,7 +136,7 @@ function demo_misc()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 0, ...
                "background"          , [1 1 1], ...
                "callback"           , "demo_update_misc",...
@@ -154,7 +152,7 @@ function demo_misc()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 0, ...
                "background"          , [1 1 1], ...
                "callback"           , "demo_update_misc",...
@@ -170,7 +168,7 @@ function demo_misc()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 0, ...
                "background"          , [1 1 1], ...
                "callback"           , "demo_update_misc",...
@@ -186,7 +184,7 @@ function demo_misc()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 0, ...
                "background"          , [1 1 1], ...
                "callback"           , "demo_update_misc",...
@@ -202,7 +200,7 @@ function demo_misc()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 0, ...
                "background"          , [1 1 1], ...
                "callback"           , "demo_update_misc",...
@@ -218,7 +216,7 @@ function demo_misc()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 0, ...
                "background"          , [1 1 1], ...
                "callback"           , "demo_update_misc",...
@@ -234,7 +232,7 @@ function demo_misc()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 0, ...
                "background"          , [1 1 1], ...
                "callback"           , "demo_update_misc",...
@@ -250,7 +248,7 @@ function demo_misc()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 0, ...
                "background"          , [1 1 1], ...
                "callback"           , "demo_update_misc",...
@@ -266,7 +264,7 @@ function demo_misc()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 0, ...
                "background"          , [1 1 1], ...
                "callback"           , "demo_update_misc",...
@@ -282,7 +280,7 @@ function demo_misc()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 0, ...
                "background"          , [1 1 1], ...
                "callback"           , "demo_update_misc",...
@@ -298,7 +296,7 @@ function demo_misc()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 0, ...
                "background"          , [1 1 1], ...
                "callback"           , "demo_update_misc",...
@@ -314,7 +312,7 @@ function demo_misc()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 0, ...
                "background"          , [1 1 1], ...
                "callback"           , "demo_update_misc",...
index c0c2689..799ef12 100644 (file)
@@ -26,22 +26,25 @@ function uicontrol_plot3d()
        // Parameters
        // =========================================================================
        
-       frame_w      = 300;     // Frame width
-       frame_h      = 550;     // Frame height
+       frame_w            = 300;     // Frame width
+       frame_h            = 550;     // Frame height
        
-       plot_w       = 600;     // Plot width
-       plot_h       = frame_h; // Plot height
+       plot_w             = 600;     // Plot width
+       plot_h             = frame_h; // Plot height
        
-       margin_x     = 15;      // Horizontal margin between each elements
-       margin_y     = 15;      // Vertical margin between each elements
+       margin_x           = 15;      // Horizontal margin between each elements
+       margin_y           = 15;      // Vertical margin between each elements
        
-       padding_x    = 10;      // Horizontal padding between each elements
-       padding_y    = 10;      // Vertical padding between each elements
+       padding_x          = 10;      // Horizontal padding between each elements
+       padding_y          = 10;      // Vertical padding between each elements
        
-       button_w     = 100;     // Button width
-       button_h     = 30;      // Button height
+       button_w           = 100;     // Button width
+       button_h           = 30;      // Button height
+       
+       defaultfont        = "arial"; // Default Font
+       subframe_font_size = 12;      // Title font size (Rotation angle, Colormap, ...)
+       text_font_size     = 11;      // Text font size
        
-       defaultfont  = "arial"; // Default Font
        
        // Figure creation
        // ========================================================================= 
@@ -86,10 +89,6 @@ function uicontrol_plot3d()
                "style"               , "frame",...
                "units"               , "pixels",...
                "position"            , [ margin_x margin_y frame_w frame_h],...
-               "fontname"            , "arial",...
-               "fontunits"           , "points",...
-               "fontsize"            , 13,...
-               "fontweight"          , "bold", ...
                "horizontalalignment" , "center", ...
                "background"          , [1 1 1], ...
                "tag"                 , "frame_control" ...
@@ -104,7 +103,7 @@ function uicontrol_plot3d()
                "position"            , [ 30+margin_x margin_y+frame_h-10 frame_w-60 20 ],...
                "fontname"            , defaultfont,...
                "fontunits"           , "points",...
-               "fontsize"            , 14,...
+               "fontsize"            , 16,...
                "horizontalalignment" , "center", ...
                "background"          , [1 1 1], ...
                "tag"                 , "title_frame_control" ...
@@ -134,10 +133,6 @@ function uicontrol_plot3d()
                "style"               , "frame",...
                "units"               , "pixels",...
                "position"            , [ my_ra_frame_pos_x my_ra_frame_pos_y my_ra_frame_w my_ra_frame_h],...
-               "fontname"            , "arial",...
-               "fontunits"           , "points",...
-               "fontsize"            , 13,...
-               "fontweight"          , "bold", ...
                "horizontalalignment" , "center", ...
                "background"          , [1 1 1], ...
                "tag"                 , "frame_control" ...
@@ -153,7 +148,7 @@ function uicontrol_plot3d()
                "position"            , [ 70+my_ra_frame_pos_x my_ra_frame_pos_y+my_ra_frame_h-9 my_ra_frame_w-140 18 ],...
                "fontname"            , defaultfont,...
                "fontunits"           , "points",...
-               "fontsize"            , 9,...
+               "fontsize"            , subframe_font_size,...
                "horizontalalignment" , "center", ...
                "background"          , [1 1 1], ...
                "tag"                 , "title_frame_control" ...
@@ -188,10 +183,6 @@ function uicontrol_plot3d()
                "style"               , "frame",...
                "units"               , "pixels",...
                "position"            , [ my_cmap_frame_pos_x my_cmap_frame_pos_y my_cmap_frame_w my_cmap_frame_h],...
-               "fontname"            , "arial",...
-               "fontunits"           , "points",...
-               "fontsize"            , 13,...
-               "fontweight"          , "bold", ...
                "horizontalalignment" , "center", ...
                "background"          , [1 1 1], ...
                "tag"                 , "frame_control" ...
@@ -207,7 +198,7 @@ function uicontrol_plot3d()
                "position"            , [ 100+my_cmap_frame_pos_x my_cmap_frame_pos_y+my_cmap_frame_h-9 my_cmap_frame_w-200 18 ],...
                "fontname"            , defaultfont,...
                "fontunits"           , "points",...
-               "fontsize"            , 9,...
+               "fontsize"            , subframe_font_size,...
                "horizontalalignment" , "center", ...
                "background"          , [1 1 1], ...
                "tag"                 , "title_frame_control" ...
@@ -223,7 +214,7 @@ function uicontrol_plot3d()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "min"                , 0, ...
                "max"                , 1, ...
                "value"              , 1, ...
@@ -241,7 +232,7 @@ function uicontrol_plot3d()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "min"                , 0, ...
                "max"                , 1, ...
                "value"              , 0, ...
@@ -258,8 +249,8 @@ function uicontrol_plot3d()
                "position"           , [ my_cmap_frame_pos_x+10 my_cmap_frame_pos_y+my_cmap_frame_h-90 my_cmap_frame_w-25 20],...
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
+               "fontsize"           , text_font_size,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
                "min"                , 0, ...
                "max"                , 1, ...
                "value"              , 0, ...
@@ -290,10 +281,6 @@ function uicontrol_plot3d()
                "style"               , "frame",...
                "units"               , "pixels",...
                "position"            , [ my_bac_frame_pos_x my_bac_frame_pos_y my_bac_frame_w my_bac_frame_h],...
-               "fontname"            , "arial",...
-               "fontunits"           , "points",...
-               "fontsize"            , 13,...
-               "fontweight"          , "bold", ...
                "horizontalalignment" , "center", ...
                "background"          , [1 1 1], ...
                "tag"                 , "frame_bac" ...
@@ -309,7 +296,7 @@ function uicontrol_plot3d()
                "position"            , [ 70+my_bac_frame_pos_x my_bac_frame_pos_y+my_bac_frame_h-9 my_bac_frame_w-140 18 ],...
                "fontname"            , defaultfont,...
                "fontunits"           , "points",...
-               "fontsize"            , 9,...
+               "fontsize"            , subframe_font_size,...
                "horizontalalignment" , "center", ...
                "background"          , [1 1 1], ...
                "tag"                 , "title_frame_bac" ...
@@ -344,10 +331,6 @@ function uicontrol_plot3d()
                "style"               , "frame",...
                "units"               , "pixels",...
                "position"            , [ my_sh_frame_pos_x my_sh_frame_pos_y my_sh_frame_w my_sh_frame_h],...
-               "fontname"            , "arial",...
-               "fontunits"           , "points",...
-               "fontsize"            , 13,...
-               "fontweight"          , "bold", ...
                "horizontalalignment" , "center", ...
                "background"          , [1 1 1], ...
                "tag"                 , "frame_show_hide" ...
@@ -363,7 +346,7 @@ function uicontrol_plot3d()
                "position"            , [ 100+my_sh_frame_pos_x my_sh_frame_pos_y+my_sh_frame_h-9 my_sh_frame_w-200 18 ],...
                "fontname"            , defaultfont,...
                "fontunits"           , "points",...
-               "fontsize"            , 9,...
+               "fontsize"            , subframe_font_size,...
                "horizontalalignment" , "center", ...
                "background"          , [1 1 1], ...
                "tag"                 , "title_frame_show_hide" ...
@@ -379,7 +362,7 @@ function uicontrol_plot3d()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 1, ...
                "background"          , [1 1 1], ...
                "callback"           , "update_tics_visible",...
@@ -395,7 +378,7 @@ function uicontrol_plot3d()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 1, ...
                "background"          , [1 1 1], ...
                "callback"           , "update_title_visible",...
@@ -411,7 +394,7 @@ function uicontrol_plot3d()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 1, ...
                "background"          , [1 1 1], ...
                "callback"           , "update_labels_visible",...
@@ -427,7 +410,7 @@ function uicontrol_plot3d()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "value"              , 1, ...
                "background"          , [1 1 1], ...
                "callback"           , "update_edges_visible",...
@@ -449,10 +432,6 @@ function uicontrol_plot3d()
                "style"               , "frame",...
                "units"               , "pixels",...
                "position"            , [ my_edittitle_frame_pos_x my_edittitle_frame_pos_y my_edittitle_frame_w my_edittitle_frame_h],...
-               "fontname"            , "arial",...
-               "fontunits"           , "points",...
-               "fontsize"            , 13,...
-               "fontweight"          , "bold", ...
                "horizontalalignment" , "center", ...
                "background"          , [1 1 1], ...
                "tag"                 , "frame_edittitle" ...
@@ -468,7 +447,7 @@ function uicontrol_plot3d()
                "position"            , [ 100+my_edittitle_frame_pos_x my_edittitle_frame_pos_y+my_edittitle_frame_h-9 my_edittitle_frame_w-200 18 ],...
                "fontname"            , defaultfont,...
                "fontunits"           , "points",...
-               "fontsize"            , 9,...
+               "fontsize"            , subframe_font_size,...
                "horizontalalignment" , "center", ...
                "background"          , [1 1 1], ...
                "tag"                 , "title_frame_edittitle" ...
@@ -483,7 +462,7 @@ function uicontrol_plot3d()
                "horizontalalignment", "left",...
                "fontname"           , defaultfont,...
                "fontunits"          , "points",...
-               "fontsize"           , 10,...
+               "fontsize"           , text_font_size,...
                "string"             , "My Beautiful Plot", ...
                "callback"           , "update_title_string",...
                "tag"                , "edittitle");