Scilab Website | Contribute with GitLab | Scilab Community | ATOMS toolboxes
Scilab Online Help
2026.1.0 - Русский


xcosDiagramExport

Export an Xcos diagram to an image

Syntax

xcosDiagramExport(scs_m, filename)
xcosDiagramExport(scs_m, "%s.png")

Arguments

  • scs_m: The scicos_diagram data structure.

  • filename: The image file to export (svg, png, etc..).

Description

The command export the diagram to an image as if the user selected the "File - Export" menu. By default the scicos_diagram data structure is rendered as a single layer into the file. The file format is detected by the file extension.

To export multiple layers, use a format string with "%s" in the filename. Each diagram layer is exported using their name (or index if empty) in the formatted string.

Examples

filename=SCI+"/modules/xcos/demos/demo_Datatype.zcos";
scs_m = xcosDiagramToScilab(filename);
xcosDiagramExport(scs_m, "TMPDIR/demo_Datatype.png");
filename=SCI+"/modules/xcos/demos/demo_Datatype.zcos";
scs_m = xcosDiagramToScilab(filename);
xcosDiagramExport(scs_m, "TMPDIR/exported_%s.png");

See Also

Report an issue
<< xcosAddToolsMenu Scilab Utilities Functions xcosDiagramToScilab >>

Copyright (c) 2022-2026 (Dassault Systèmes S.E.)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue May 19 14:01:55 CEST 2026