.. highlightlang:: us .. index:: auto_xy_SetStyleAttribs .. _auto_xy_setstyleattribs: auto_xy_SetStyleAttribs ======================= .. us.tag auto_xy_SetStyleAttribs NOTREADYENGLISH auto_xy :ref:`auto_xy_SetStyleAttribs` sets the line and/or marker style, color, etc. without using the style file. .. function:: bool = auto_xy_SetStyleAttribs(hData, PropName, PropValue) bool = auto_xy_SetStyleAttribs(hData, PropName, PropValue, PropName, PropValue) .. us.return **Return Value** *bool* is TRUE (1) if the function was successful, otherwise FALSE (0). .. us.params **Parameters** .. uparam:: hData *hData* is the handle of a 1D or 2D dataset. The handle is returned by the function :ref:`auto_LoadDataset`. .. uparam:: PropName *PropName* is a string with the value ``"Line"`` or ``"Marker"``. Depending on the value the following parameter *PropValue* is a vector with 5 or 9 elements. .. uparam:: PropValue *PropValue* is a vector with attribute values. **Line** For the value *PropName* = ``"Line"`` the vector has 5 elements: .. list-table:: :header-rows: 1 * - Value - Meaning * - rvLine[1] - Line style (0 to 5) (see PenCreate) * - rvLine[2] - Line width in steps of 0.1 mm. * - rvLine[3,4,5] - Line color (red, green, blue in the range 0 to 255) **Marker** For the value *PropName* = ``"Marker"`` the vector has 9 or 10 elements: .. list-table:: :header-rows: 1 * - Value - Meaning * - rvMarker[1] - Marker type (0 to 20) * - rvMarker[2] - size of the symbol in centimeters * - rvMarker[3,4,5] - color of the symbol edge (red, green, blue in the range 0 to 255) * - rvMarker[6,7,8] - fill color (red, green, blue in the range 0 to 255) * - rvMarker[9] - line width in steps of 0.1 mm. * - rvMarker[10] - (Option) Filling: 0: Opaque, 1: Transparent, Default is 0. * - - * - **Markertyp** - * - The marker style is one of the following values - * - (The number or the alias can be used - e.g. 3 or ``MS_CIRCLE``): .. list-table:: :header-rows: 1 * - Value - Meaning * - (0) MS_PLUS - Plus sign * - (1) MS_CROSS - Cross * - (2) MS_SIMPLESTAR - Star * - (3) MS_CIRCLE - Circle * - (4) MS_RECTANGLE - Rectangle * - (5) MS_DIAMOND - Diamond * - (6) MS_TRIANGLE - Triangle * - (7) MS_TRIANGLE1 - Triangle turned 90 degrees * - (8) MS_TRIANGLE2 - Triangle turned 180 degrees * - (9) MS_TRIANGLE3 - Triangle turned 270 degrees * - (10) MS_HOURGLASS - Hourglass (2 triangles) * - (11) MS_HOURGLASS1 - Hourglass turned 90 degrees * - (12) MS_STAR - Star * - (13) MS_CIRCLEDOT - Circle with dot * - (14) MS_CIRCLEPLUS - Circle with Plus sign * - (15) MS_CIRCLECROSS - Circle with cross * - (16) MS_RECTDOT - Rectangle with dot * - (17) MS_RECTPLUS - Rectangle with plus sign * - (18) MS_RECTCROSS - Rectangle with cross * - (19) MS_NULL - Invisible Marker * - (20) MS_DOT - smallest plotable point .. us.example **Example** :: auto_xy_SetStyleAttribs(hData, "Line", [0, 4, 255, 0, 0], ... "Marker", [3, 0.15, 0, 0, 0, 255, 0, 0 , 1]); auto_xy_SetStyleAttribs(hData, "Line", [0, 4, 255, 0, 0]); auto_xy_SetStyleAttribs(hData, "Marker", [3, 0.15, 0, 0, 0, 255, 0, 0 , 1]); auto_xy_SetStyleAttribs(hData, "Marker", [MS_CIRCLE, 0.15, 0, 0, 0, 255, 0, 0 , 1]); rvMarker = [MS_CIRCLE, 0.15, 0, 0, 0, 255, 0, 0 , 1] auto_xy_SetStyleAttribs(hData, "Marker", rvMarker); One complete example :: auto_AddToUI("Examples", "Example", "RS_Example"); def RS_Example() { rmColor = [255,0,0; 0,0,255]; // Red, Blue auto_SetFileNameDialogInit("*.dat;*.nc"); svFile = auto_GetFileNameDialog(2); if (svFile[1] == "DLG_CANCEL") { return; } auto_LoadTemplate("Example.ipw"); nFile = len(svFile); for (i in 1:nFile) { auto_ImportData(svFile[i]); hData = auto_LoadDataset("Diagramm 1", "Zeitkanal", "LAMBDA"); auto_xy_SetStyleAttribs(hData, "Line", [0, 4, rmColor[i;]], ... "Marker", [3, 0.15, 0, 0, 0 ,rmColor[i;], 1]); hData = auto_LoadDataset("Diagramm 2", "Zeitkanal", "TMOT"); auto_xy_SetStyleAttribs(hData, "Line", [0, 4, rmColor[i;]]); } auto_ScaleAxes(); auto_UpdatePage(); } .. seealso:: :ref:`overview-automation`, :ref:`auto_LoadDataset`, :ref:`PenCreate`, :ref:`MarkerCreate`, :ref:`XYSetStyle`, :ref:`XYSetPen`, :ref:`XYSetMarker` :sub:`id-61470`