fb:porticula NoPaste
Liniengrafik mit Markern (GooData-Beispiel)
Uploader: | TJF |
Datum/Zeit: | 21.04.2012 20:04:03 |
Hinweis: Dieser Quelltext ist Bestandteil des Projekts GooData, zu dem es auf FreeBASIC-Portal.de eine Projektseite gibt.
' This is file ex_line_markers.bas
'
' Licence: GPLv3
' (C) 2012 Thomas[ dot ]Freiherr[ at ]gmx[ dot ]net
VAR root = goo_canvas_group_new(Glob, _
"line_width", line_group, _
NULL)
VAR title = goo_canvas_text_new(root, _
"<span size=""xx-large"">"_
"Line Graph With Markers" _
!"</span>\n", _
0.0, 0.0, W, GOO_CANVAS_ANCHOR_SW, _
"use_markup", TRUE, _
"alignment", PANGO_ALIGN_CENTER, _
NULL)
VAR grid = goo_canvas_rect_new(root, _
0.0, 0.0, W, H, _
"fill_color", "#F7F19E", _
"stroke_pattern", NULL, _
NULL)
VAR x = goo_axis_new(root, grid, Tx, GOO_AXIS_SOUTH, _
"text_align", PANGO_ALIGN_RIGHT, _
"offset", "-" & H / 2, _
"borders", "-3.3 3.3", _
"tick_length", "5 5", _
"ticks", "-3 -2 -1 1 2 3", _
NULL)
VAR y = goo_axis_new(root, grid, Ty, GOO_AXIS_WEST, _
"text_align", PANGO_ALIGN_RIGHT, _
"offset", "-" & W / 2, _
"text_offset", 0., _
"borders", "-1.15 1.15", _
"ticks", "-1 -.5 .5 1", _
"tick_length", "5 5", _
NULL)
VAR zz = goo_curve_new(root, x, y, Dat, 0, 2, 0, _
"marker_type", GOO_MARKER_CIRCLE, _
NULL)
goo_curve_set_markers_properties(zz, _
"stroke_color", "brown", _
"fill_color", "green", _
NULL)
VAR z = goo_curve_new(root, x, y, Dat, 0, 1, 0, _
"marker_type", GOO_MARKER_RHOMBUS, _
"marker_size", 10., _
NULL)
goo_curve_set_markers_properties(z, _
"stroke_color", "brown", _
"fill_color", "red", _
NULL)