dessin_pal - export palette figure in eps file
dessin_pal(name,flag)
- name : string. path+name of the .cosf file
- flag : string. option to set the up/down and letf/right margin
- 'html' : to produce a figure for html man page
- 'guide' : to produce a figure for man page with paper format
//dessin_pal
//fonction qui charge un fichier cosf dans une liste
//scs_m et qui exporte les données graphiques dans un fichier
//eps grâce à mdo_export
//Entrée name : chemin+nom de la palette
// ex : name=MODNUM+'/macros/scicos_blocks/Tools.cosf'
function dessin_pal(name,flag)
if fileinfo(name)<>[] then
//load scicos variable and library
bak=get('figure_style');
set("figure_style","old");
olds=get('old_style');
set('old_style','on');
//load scicos variable and library
load SCI/macros/scicos/lib
exec(loadpallibs,-1)
%scicos_prob=%f;
alreadyran=%f
needcompile=4
%zoom=1.8;
colmap=xget('colormap');
exec(name,-1)
if flag=='html' then
newflag='html_pal'
else
newflag=flag
end
mdo_export(scs_m,basename(name)+'_cosf',newflag)
//restore figure_style
gg=xget('window') // for bug in figure_style and winsid
xset('window',0) // for bug in figure_style and winsid
set('figure_style',bak)
set('old_style',stripblanks(olds));
xset('window',gg) // for bug in figure_style and winsid
else
printf("Unable to find cosf file");
end
endfunction
IRCOM Group
Alan Layec