[Scilab-users] Prettify function - few questions
Izabela Wójcik-Grząba
iwoj at il.pw.edu.pl
Thu Feb 21 11:43:05 CET 2019
Hello,
I have just found this wonderful function by Pierre and I am testing it
with
some of my examples. It is really great, but I have a few problems. Here
is
my example code:
delta_z=[-0.227039004 -0.185352532 -0.090222505 -0.048541026
-0.709541661 -0.449264874 -0.400240851 -0.137193379
-1.535445685 -0.833433297 -1.023699148 -0.307291415
-2.728796828 -1.374973092 -1.989880189 -0.595703454
-4.282713475 -2.100641351 -3.296290987 -1.029694398
-6.174546374 -3.02623229 -4.92376907 -1.626225009
-8.376462642 -4.160562133 -6.847085402 -2.395578004];
f_l=[0.20030479
0.29234647
0.36879976
0.43788566
0.50263554
0.56453135
0.62441298];
L_0=[11:1:17]';
f_l_labels=[string(f_l)+' ('+string(L_0)+')'];
format(5);
plot(f_l,[delta_z(:,1),delta_z(:,2),delta_z(:,3),delta_z(:,4)]);
f=gcf();a1=f.children;
f.axes_size=[1400,900];
a1.margins=[0.1 0.04 0.07 0.15];
a1.grid=[-1,1];
a1.title.text='Blad wzgledny rzednej,h=0 m';
a1.x_label.text='f/l $(L_0)$';
a1.y_label.text='${\delta}_z$ [%]';
a1.x_ticks = tlist(["ticks","locations","labels"],f_l,f_l_labels);
a1.sub_ticks=[0 0];
a1.fractional_font='on';
a1.auto_scale='off';
a1.data_bounds=[min(f_l)-0.01,min(delta_z);max(f_l),max(delta_z)+0.1];
a1.children.children.line_mode='off';
a1.children.children.mark_mode='on';
a1.children.children.mark_style=[1;2;9;11];
a1.children.children.mark_foreground=[2;5;13;22];
a1.children.children.mark_background=[0;0;0;0];
a1.children.children.mark_size_unit='point';
a1.children.children.mark_size=17;
legend([a1.children.children(1);a1.children.children(2);a1.children.children(3);..
a1.children.children(4);],[" 16 el. 3 iteracje ";" 16 el. 2 iteracje
";..
" 8 el. 3 iteracje ";" 8 el. 2 iteracje "],marks_count=1,..
legend_location='in_lower_left');
opt.title_font_size=6;
opt.labels_font_size=6;
opt.thicks_font_size=6;
opt.line_thickness=4;
opt.legend_font_size=6;
prettify(f, opt)
And here are my problems:
1. Title and labels seem to not be "latexified"
2. Legend_font_size is not changing the font size
3. I've tried to add an option of changing font in a loop in a
"latexify"
function as below:
str(i) = '$ \mathds{' + wrap_in_text(str(i)) + '}$'
but it doesn't work
4. And different kind of problem: why the green circles on the plot are
"trimmed" on sides, top and bottom?
Could anyone help me with these problems? Any ideas?
Pierre, thanks a lot for the function.
Regards,
Iza
p.s. I don't know how to continue an old topic about this function - is
it possible?
More information about the users
mailing list