[goffice] New scattered min-max plot type. [#683493]
- From: Jean BrÃfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] New scattered min-max plot type. [#683493]
- Date: Thu, 13 Sep 2012 11:07:46 +0000 (UTC)
commit 138f11aaf4461c4105760cf6f94099b2c014689f
Author: Jean Brefort <jean brefort normalesup org>
Date: Thu Sep 13 13:07:34 2012 +0200
New scattered min-max plot type. [#683493]
ChangeLog | 14 +
NEWS | 3 +
plugins/plot_xy/Makefile.am | 8 +-
plugins/plot_xy/chart_minmax_1_3.png | Bin 0 -> 1895 bytes
plugins/plot_xy/chart_minmax_1_3.svg | 278 +++++++++++++++++++
plugins/plot_xy/chart_minmax_1_4.png | Bin 0 -> 1825 bytes
plugins/plot_xy/chart_minmax_1_4.svg | 279 +++++++++++++++++++
plugins/plot_xy/chart_minmax_2_3.png | Bin 0 -> 2402 bytes
plugins/plot_xy/chart_minmax_2_3.svg | 318 +++++++++++++++++++++
plugins/plot_xy/chart_minmax_2_4.png | Bin 0 -> 2387 bytes
plugins/plot_xy/chart_minmax_2_4.svg | 383 +++++++++++++++++++++++++
plugins/plot_xy/gog-xy-minmax.c | 506 ++++++++++++++++++++++++++++++++++
plugins/plot_xy/gog-xy-minmax.h | 44 +++
plugins/plot_xy/gog-xy.c | 22 +--
plugins/plot_xy/plot-types.xml.in | 36 +++-
plugins/plot_xy/plugin.xml.in | 5 +
16 files changed, 1875 insertions(+), 21 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ca808b8..f266c5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2012-09-13 Jean Brefort <jean brefort normalesup org>
+
+ * plugins/plot_xy/Makefile.am: add XYMinMax plot. [#683493]
+ * plugins/plot_xy/chart_minmax_1_3.svg: new icon.
+ * plugins/plot_xy/chart_minmax_1_4.svg:
+ * plugins/plot_xy/chart_minmax_2_3.svg:
+ * plugins/plot_xy/chart_minmax_2_4.svg:
+ * plugins/plot_xy/gog-xy.c (go_plugin_init): register xy-minmax types.
+ * plugins/plot_xy/gog-xy-minmax.c: Scattered MinMax plot implementation.
+ (gog_xy_minmax_view_render), (gog_xy_minmax_view_class_init):
+ * plugins/plot_xy/gog-xy-minmax.h:
+ * plugins/plot_xy/plot-types.xml.in: register new plot type.
+ * plugins/plot_xy/plugin.xml.in: ditto.
+
2012-09-11 Andreas J. Guelzow <aguelzow pyrshep ca>
* goffice/utils/go-format.c (go_format_output_to_odf): try to improve
diff --git a/NEWS b/NEWS
index 306bed4..d9bc7a9 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,9 @@ goffice 0.9.7:
Andreas:
* Handle some more unusual formats in ODF export. [#683801]
+Jean:
+ * New scattered min-max plot type. [#683493]
+
--------------------------------------------------------------------------
goffice 0.9.6:
diff --git a/plugins/plot_xy/Makefile.am b/plugins/plot_xy/Makefile.am
index 08d0205..b3d9cb7 100644
--- a/plugins/plot_xy/Makefile.am
+++ b/plugins/plot_xy/Makefile.am
@@ -9,7 +9,9 @@ xy_la_SOURCES = \
gog-xy.c \
gog-xy.h \
gog-xy-dropbar.c \
- gog-xy-dropbar.h
+ gog-xy-dropbar.h \
+ gog-xy-minmax.c \
+ gog-xy-minmax.h
xml_in_files = plugin.xml.in plot-types.xml.in
xml_DATA = $(xml_in_files:.xml.in=.xml)
@@ -40,6 +42,10 @@ embedded_stuff_raw = \
chart_colored_1_1.png \
chart_dropbar_1_3.png \
chart_dropbar_1_4.png \
+ chart_minmax_1_3.png \
+ chart_minmax_1_4.png \
+ chart_minmax_2_3.png \
+ chart_minmax_2_4.png \
chart_scatter_1_1.png \
chart_scatter_2_1.png \
chart_scatter_2_2.png \
diff --git a/plugins/plot_xy/chart_minmax_1_3.png b/plugins/plot_xy/chart_minmax_1_3.png
new file mode 100644
index 0000000..868bb38
Binary files /dev/null and b/plugins/plot_xy/chart_minmax_1_3.png differ
diff --git a/plugins/plot_xy/chart_minmax_1_3.svg b/plugins/plot_xy/chart_minmax_1_3.svg
new file mode 100644
index 0000000..a9a3f1e
--- /dev/null
+++ b/plugins/plot_xy/chart_minmax_1_3.svg
@@ -0,0 +1,278 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ inkscape:export-ydpi="25.4"
+ inkscape:export-xdpi="25.4"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_1_3.png"
+ sodipodi:docname="chart_minmax_1_3.svg"
+ height="60.000000mm"
+ width="64.000000mm"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:version="0.32"
+ id="svg1"
+ version="1.1">
+ <defs
+ id="defs3">
+ <linearGradient
+ id="linearGradient6655">
+ <stop
+ id="stop6656"
+ offset="0.0000000"
+ style="stop-color:#ffda86;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6657"
+ offset="0.81471545"
+ style="stop-color:#c68c0b;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6658"
+ offset="1.0000000"
+ style="stop-color:#664805;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6649">
+ <stop
+ id="stop6650"
+ offset="0.0000000"
+ style="stop-color:#b5e6b0;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6652"
+ offset="0.81471545"
+ style="stop-color:#6c8969;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6651"
+ offset="1.0000000"
+ style="stop-color:#3b4b39;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4044">
+ <stop
+ id="stop4045"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:0.0000000;" />
+ <stop
+ id="stop4046"
+ offset="1.0000000"
+ style="stop-color:#363636;stop-opacity:0.18750000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3418">
+ <stop
+ id="stop3419"
+ offset="0.0000000"
+ style="stop-color:#f7f7f7;stop-opacity:1.0000000;" />
+ <stop
+ id="stop3420"
+ offset="1.0000000"
+ style="stop-color:#dedede;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2791">
+ <stop
+ id="stop2792"
+ offset="0.0000000"
+ style="stop-color:#fbfbfb;stop-opacity:1.0000000;" />
+ <stop
+ id="stop2793"
+ offset="1.0000000"
+ style="stop-color:#e9e9e9;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ y2="0.96103895"
+ x2="0.49079755"
+ y1="0.058441557"
+ x1="0.49693251"
+ id="linearGradient2794"
+ xlink:href="#linearGradient2791"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="0.98051947"
+ x2="0.53254437"
+ y1="0.012987013"
+ x1="0.53846157"
+ id="linearGradient3417"
+ xlink:href="#linearGradient3418"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="0.99350649"
+ x2="0.49689442"
+ y1="0.012987013"
+ x1="0.49689442"
+ id="linearGradient4043"
+ xlink:href="#linearGradient4044"
+ inkscape:collect="always" />
+ </defs>
+ <sodipodi:namedview
+ inkscape:current-layer="svg1"
+ showguides="true"
+ inkscape:window-y="27"
+ inkscape:window-x="0"
+ guidetolerance="1.0000000mm"
+ inkscape:guide-points="true"
+ inkscape:guide-bbox="true"
+ gridtolerance="1.0000000px"
+ inkscape:grid-bbox="true"
+ inkscape:grid-points="true"
+ showgrid="true"
+ showborder="true"
+ inkscape:window-height="971"
+ inkscape:window-width="1270"
+ inkscape:cy="120.2872"
+ inkscape:cx="85.487865"
+ inkscape:zoom="4.4593316"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0000000"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:window-maximized="0">
+ <sodipodi:guide
+ id="guide5924"
+ position="23.994627"
+ orientation="vertical" />
+ <sodipodi:guide
+ id="guide5925"
+ position="58.080453"
+ orientation="vertical" />
+ <sodipodi:guide
+ id="guide5926"
+ position="92.166278"
+ orientation="vertical" />
+ <sodipodi:guide
+ id="guide5927"
+ position="126.25210"
+ orientation="vertical" />
+ <inkscape:grid
+ id="GridFromPre046Settings"
+ type="xygrid"
+ originx="0.50000000mm"
+ originy="0.50000000mm"
+ spacingx="1.0000000mm"
+ spacingy="1.0000000mm"
+ color="#3f3fff"
+ empcolor="#3f3fff"
+ opacity="0.15"
+ empopacity="0.38"
+ empspacing="5" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="23.040251"
+ x="23.031496"
+ height="177.15660"
+ width="184.25197"
+ id="rect4047"
+ style="fill:url(#linearGradient4043);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="23.031490"
+ x="26.574802"
+ height="173.62204"
+ width="177.16536"
+ id="rect3421"
+ style="fill:url(#linearGradient4043);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="26.554472"
+ x="30.118111"
+ height="159.80026"
+ width="170.38249"
+ id="rect2169"
+ style="fill:url(#linearGradient2794);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5262673;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="31.699234"
+ x="31.955462"
+ height="149.19994"
+ width="163.39728"
+ id="rect3416"
+ style="fill:url(#linearGradient3417);fill-opacity:0.74901998;fill-rule:evenodd;stroke:none;stroke-width:3.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="26.574797"
+ x="29.993284"
+ height="159.80026"
+ width="170.38249"
+ id="rect5928"
+ style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.5262673;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <path
+ style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#0000c2;stroke-width:3.5433071;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ d="M 164.76378,39.856732 C 164.76378,149.39923 164.42434,149.39923 164.42434,149.39923"
+ id="path10050"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#0000c2;stroke-width:3.34384537;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 114.25092,87.476474 c 0,61.442136 -0.53886,61.442136 -0.53886,61.442136"
+ id="path10050-6"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#0000c2;stroke-width:3.46500993;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 67.531704,87.881908 c 0,85.120972 -0.41774,85.120972 -0.41774,85.120972"
+ id="path10050-8"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#0000c2;stroke-width:3.4650104;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 54.103493,43.704879 c 0,85.120961 -0.41774,85.120961 -0.41774,85.120961"
+ id="path10050-31"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#0000c2;stroke-width:2.96213007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 182.59138,137.63218 c 0,28.22387 -0.92052,28.22387 -0.92052,28.22387"
+ id="path10050-84"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+</svg>
diff --git a/plugins/plot_xy/chart_minmax_1_4.png b/plugins/plot_xy/chart_minmax_1_4.png
new file mode 100644
index 0000000..aacd7c9
Binary files /dev/null and b/plugins/plot_xy/chart_minmax_1_4.png differ
diff --git a/plugins/plot_xy/chart_minmax_1_4.svg b/plugins/plot_xy/chart_minmax_1_4.svg
new file mode 100644
index 0000000..1f08182
--- /dev/null
+++ b/plugins/plot_xy/chart_minmax_1_4.svg
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ inkscape:export-ydpi="25.4"
+ inkscape:export-xdpi="25.4"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_1_4.png"
+ sodipodi:docname="chart_minmax_1_4.svg"
+ height="60.000000mm"
+ width="64.000000mm"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:version="0.32"
+ id="svg1"
+ version="1.1">
+ <defs
+ id="defs3">
+ <linearGradient
+ id="linearGradient6655">
+ <stop
+ id="stop6656"
+ offset="0.0000000"
+ style="stop-color:#ffda86;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6657"
+ offset="0.81471545"
+ style="stop-color:#c68c0b;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6658"
+ offset="1.0000000"
+ style="stop-color:#664805;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6649">
+ <stop
+ id="stop6650"
+ offset="0.0000000"
+ style="stop-color:#b5e6b0;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6652"
+ offset="0.81471545"
+ style="stop-color:#6c8969;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6651"
+ offset="1.0000000"
+ style="stop-color:#3b4b39;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4044">
+ <stop
+ id="stop4045"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:0.0000000;" />
+ <stop
+ id="stop4046"
+ offset="1.0000000"
+ style="stop-color:#363636;stop-opacity:0.18750000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3418">
+ <stop
+ id="stop3419"
+ offset="0.0000000"
+ style="stop-color:#f7f7f7;stop-opacity:1.0000000;" />
+ <stop
+ id="stop3420"
+ offset="1.0000000"
+ style="stop-color:#dedede;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2791">
+ <stop
+ id="stop2792"
+ offset="0.0000000"
+ style="stop-color:#fbfbfb;stop-opacity:1.0000000;" />
+ <stop
+ id="stop2793"
+ offset="1.0000000"
+ style="stop-color:#e9e9e9;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ y2="0.96103895"
+ x2="0.49079755"
+ y1="0.058441557"
+ x1="0.49693251"
+ id="linearGradient2794"
+ xlink:href="#linearGradient2791"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="0.98051947"
+ x2="0.53254437"
+ y1="0.012987013"
+ x1="0.53846157"
+ id="linearGradient3417"
+ xlink:href="#linearGradient3418"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="0.99350649"
+ x2="0.49689442"
+ y1="0.012987013"
+ x1="0.49689442"
+ id="linearGradient4043"
+ xlink:href="#linearGradient4044"
+ inkscape:collect="always" />
+ </defs>
+ <sodipodi:namedview
+ inkscape:current-layer="svg1"
+ showguides="true"
+ inkscape:window-y="27"
+ inkscape:window-x="0"
+ guidetolerance="1.0000000mm"
+ inkscape:guide-points="true"
+ inkscape:guide-bbox="true"
+ gridtolerance="1.0000000px"
+ inkscape:grid-bbox="true"
+ inkscape:grid-points="true"
+ showgrid="true"
+ showborder="true"
+ inkscape:window-height="971"
+ inkscape:window-width="1270"
+ inkscape:cy="120.2872"
+ inkscape:cx="85.936363"
+ inkscape:zoom="4.4593316"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0000000"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:window-maximized="0">
+ <sodipodi:guide
+ id="guide5924"
+ position="23.994627"
+ orientation="vertical" />
+ <sodipodi:guide
+ id="guide5925"
+ position="58.080453"
+ orientation="vertical" />
+ <sodipodi:guide
+ id="guide5926"
+ position="92.166278"
+ orientation="vertical" />
+ <sodipodi:guide
+ id="guide5927"
+ position="126.25210"
+ orientation="vertical" />
+ <inkscape:grid
+ id="GridFromPre046Settings"
+ type="xygrid"
+ originx="0.50000000mm"
+ originy="0.50000000mm"
+ spacingx="1.0000000mm"
+ spacingy="1.0000000mm"
+ color="#3f3fff"
+ empcolor="#3f3fff"
+ opacity="0.15"
+ empopacity="0.38"
+ empspacing="5" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="23.040251"
+ x="23.031496"
+ height="177.15660"
+ width="184.25197"
+ id="rect4047"
+ style="fill:url(#linearGradient4043);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="23.031490"
+ x="26.574802"
+ height="173.62204"
+ width="177.16536"
+ id="rect3421"
+ style="fill:url(#linearGradient4043);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="26.554472"
+ x="30.118111"
+ height="159.80026"
+ width="170.38249"
+ id="rect2169"
+ style="fill:url(#linearGradient2794);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5262673;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="31.699234"
+ x="31.955462"
+ height="149.19994"
+ width="163.39728"
+ id="rect3416"
+ style="fill:url(#linearGradient3417);fill-opacity:0.74901998;fill-rule:evenodd;stroke:none;stroke-width:3.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="26.574797"
+ x="29.993284"
+ height="159.80026"
+ width="170.38249"
+ id="rect5928"
+ style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.5262673;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 184.56635,59.6593 c -109.5425,0 -109.5425,0.33943 -109.5425,0.33943"
+ id="path10050"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#0000c2;stroke-width:3.34384537;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 136.94661,110.17216 c -61.44214,0 -61.44214,0.53886 -61.44214,0.53886"
+ id="path10050-6"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#0000c2;stroke-width:3.46500993;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 136.54117,156.89137 c -85.12097,0 -85.12097,0.41774 -85.12097,0.41774"
+ id="path10050-8"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#0000c2;stroke-width:3.4650104;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 180.7182,170.31958 c -85.12096,0 -85.12096,0.41774 -85.12096,0.41774"
+ id="path10050-31"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#0000c2;stroke-width:2.96213007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 86.7909,41.8317 c -28.22387,0 -28.22387,0.92052 -28.22387,0.92052"
+ id="path10050-84"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+</svg>
diff --git a/plugins/plot_xy/chart_minmax_2_3.png b/plugins/plot_xy/chart_minmax_2_3.png
new file mode 100644
index 0000000..19dd3c6
Binary files /dev/null and b/plugins/plot_xy/chart_minmax_2_3.png differ
diff --git a/plugins/plot_xy/chart_minmax_2_3.svg b/plugins/plot_xy/chart_minmax_2_3.svg
new file mode 100644
index 0000000..0411424
--- /dev/null
+++ b/plugins/plot_xy/chart_minmax_2_3.svg
@@ -0,0 +1,318 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ inkscape:export-ydpi="25.4"
+ inkscape:export-xdpi="25.4"
+ inkscape:export-filename="/home/jean/devel/goffice/pixmaps/chart_minmax_2_3.png"
+ sodipodi:docname="chart_minmax_2_3.svg"
+ height="60.000000mm"
+ width="64.000000mm"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:version="0.32"
+ id="svg1"
+ version="1.1">
+ <defs
+ id="defs3">
+ <linearGradient
+ id="linearGradient6655">
+ <stop
+ id="stop6656"
+ offset="0.0000000"
+ style="stop-color:#ffda86;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6657"
+ offset="0.81471545"
+ style="stop-color:#c68c0b;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6658"
+ offset="1.0000000"
+ style="stop-color:#664805;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6649">
+ <stop
+ id="stop6650"
+ offset="0.0000000"
+ style="stop-color:#b5e6b0;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6652"
+ offset="0.81471545"
+ style="stop-color:#6c8969;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6651"
+ offset="1.0000000"
+ style="stop-color:#3b4b39;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4044">
+ <stop
+ id="stop4045"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:0.0000000;" />
+ <stop
+ id="stop4046"
+ offset="1.0000000"
+ style="stop-color:#363636;stop-opacity:0.18750000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3418">
+ <stop
+ id="stop3419"
+ offset="0.0000000"
+ style="stop-color:#f7f7f7;stop-opacity:1.0000000;" />
+ <stop
+ id="stop3420"
+ offset="1.0000000"
+ style="stop-color:#dedede;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2791">
+ <stop
+ id="stop2792"
+ offset="0.0000000"
+ style="stop-color:#fbfbfb;stop-opacity:1.0000000;" />
+ <stop
+ id="stop2793"
+ offset="1.0000000"
+ style="stop-color:#e9e9e9;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ y2="0.96103895"
+ x2="0.49079755"
+ y1="0.058441557"
+ x1="0.49693251"
+ id="linearGradient2794"
+ xlink:href="#linearGradient2791"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="0.98051947"
+ x2="0.53254437"
+ y1="0.012987013"
+ x1="0.53846157"
+ id="linearGradient3417"
+ xlink:href="#linearGradient3418"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="0.99350649"
+ x2="0.49689442"
+ y1="0.012987013"
+ x1="0.49689442"
+ id="linearGradient4043"
+ xlink:href="#linearGradient4044"
+ inkscape:collect="always" />
+ </defs>
+ <sodipodi:namedview
+ inkscape:current-layer="svg1"
+ showguides="true"
+ inkscape:window-y="27"
+ inkscape:window-x="0"
+ guidetolerance="1.0000000mm"
+ inkscape:guide-points="true"
+ inkscape:guide-bbox="true"
+ gridtolerance="1.0000000px"
+ inkscape:grid-bbox="true"
+ inkscape:grid-points="true"
+ showgrid="true"
+ showborder="true"
+ inkscape:window-height="971"
+ inkscape:window-width="1270"
+ inkscape:cy="120.2872"
+ inkscape:cx="85.487865"
+ inkscape:zoom="4.4593316"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0000000"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:window-maximized="0">
+ <sodipodi:guide
+ id="guide5924"
+ position="23.994627"
+ orientation="vertical" />
+ <sodipodi:guide
+ id="guide5925"
+ position="58.080453"
+ orientation="vertical" />
+ <sodipodi:guide
+ id="guide5926"
+ position="92.166278"
+ orientation="vertical" />
+ <sodipodi:guide
+ id="guide5927"
+ position="126.25210"
+ orientation="vertical" />
+ <inkscape:grid
+ id="GridFromPre046Settings"
+ type="xygrid"
+ originx="0.50000000mm"
+ originy="0.50000000mm"
+ spacingx="1.0000000mm"
+ spacingy="1.0000000mm"
+ color="#3f3fff"
+ empcolor="#3f3fff"
+ opacity="0.15"
+ empopacity="0.38"
+ empspacing="5" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="23.040251"
+ x="23.031496"
+ height="177.15660"
+ width="184.25197"
+ id="rect4047"
+ style="fill:url(#linearGradient4043);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="23.031490"
+ x="26.574802"
+ height="173.62204"
+ width="177.16536"
+ id="rect3421"
+ style="fill:url(#linearGradient4043);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="26.554472"
+ x="30.118111"
+ height="159.80026"
+ width="170.38249"
+ id="rect2169"
+ style="fill:url(#linearGradient2794);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5262673;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="31.699234"
+ x="31.955462"
+ height="149.19994"
+ width="163.39728"
+ id="rect3416"
+ style="fill:url(#linearGradient3417);fill-opacity:0.74901998;fill-rule:evenodd;stroke:none;stroke-width:3.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="26.574797"
+ x="29.993284"
+ height="159.80026"
+ width="170.38249"
+ id="rect5928"
+ style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.5262673;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;" />
+ <path
+ style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#0000c2;stroke-width:3.5433071;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ d="M 164.76378,39.856732 C 164.76378,149.39923 164.42434,149.39923 164.42434,149.39923"
+ id="path10050" />
+ <rect
+ style="fill:#0000c2;fill-opacity:1.0000000;stroke:#0000c2;stroke-width:3.5433071;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ id="rect11924"
+ width="11.821243"
+ height="11.821243"
+ x="158.68343"
+ y="34.241741" />
+ <rect
+ style="fill:#0000c2;fill-opacity:1.0000000;stroke:#0000c2;stroke-width:3.5433071;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ id="rect11925"
+ width="11.821243"
+ height="11.821243"
+ x="158.68343"
+ y="144.08427" />
+ <rect
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ id="rect11924-8"
+ width="11.821243"
+ height="11.821243"
+ x="176.22049"
+ y="131.14046" />
+ <rect
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ id="rect11925-7"
+ width="11.821243"
+ height="11.821243"
+ x="176.22049"
+ y="160.02914" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#0000c2;stroke-width:3.34384537;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 114.25092,87.476474 c 0,61.442136 -0.53886,61.442136 -0.53886,61.442136"
+ id="path10050-6" />
+ <rect
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ id="rect11924-3"
+ width="11.821243"
+ height="11.821243"
+ x="108.07087"
+ y="78.533081" />
+ <rect
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ id="rect11925-2"
+ width="11.821243"
+ height="11.821243"
+ x="108.07087"
+ y="143.50395" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#0000c2;stroke-width:3.46500993;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 67.531704,87.881908 c 0,85.120972 -0.41774,85.120972 -0.41774,85.120972"
+ id="path10050-8" />
+ <rect
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ id="rect11924-9"
+ width="11.821243"
+ height="11.821243"
+ x="61.412212"
+ y="82.473633" />
+ <rect
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ id="rect11925-1"
+ width="11.821243"
+ height="11.821243"
+ x="61.412212"
+ y="167.64879" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#0000c2;stroke-width:3.4650104;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 54.103493,43.704879 c 0,85.120961 -0.41774,85.120961 -0.41774,85.120961"
+ id="path10050-31" />
+ <rect
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ id="rect11924-89"
+ width="11.821243"
+ height="11.821243"
+ x="47.984001"
+ y="39.193604" />
+ <rect
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ id="rect11925-0"
+ width="11.821243"
+ height="11.821243"
+ x="47.984001"
+ y="122.57477" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#0000c2;stroke-width:2.96213007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 182.59138,137.63218 c 0,28.22387 -0.92052,28.22387 -0.92052,28.22387"
+ id="path10050-84" />
+</svg>
diff --git a/plugins/plot_xy/chart_minmax_2_4.png b/plugins/plot_xy/chart_minmax_2_4.png
new file mode 100644
index 0000000..efaac22
Binary files /dev/null and b/plugins/plot_xy/chart_minmax_2_4.png differ
diff --git a/plugins/plot_xy/chart_minmax_2_4.svg b/plugins/plot_xy/chart_minmax_2_4.svg
new file mode 100644
index 0000000..d5adca7
--- /dev/null
+++ b/plugins/plot_xy/chart_minmax_2_4.svg
@@ -0,0 +1,383 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ inkscape:export-ydpi="25.4"
+ inkscape:export-xdpi="25.4"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_4.png"
+ sodipodi:docname="chart_minmax_2_4.svg"
+ height="60.000000mm"
+ width="64.000000mm"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:version="0.32"
+ id="svg1"
+ version="1.1">
+ <defs
+ id="defs3">
+ <linearGradient
+ id="linearGradient6655">
+ <stop
+ id="stop6656"
+ offset="0.0000000"
+ style="stop-color:#ffda86;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6657"
+ offset="0.81471545"
+ style="stop-color:#c68c0b;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6658"
+ offset="1.0000000"
+ style="stop-color:#664805;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6649">
+ <stop
+ id="stop6650"
+ offset="0.0000000"
+ style="stop-color:#b5e6b0;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6652"
+ offset="0.81471545"
+ style="stop-color:#6c8969;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6651"
+ offset="1.0000000"
+ style="stop-color:#3b4b39;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4044">
+ <stop
+ id="stop4045"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:0.0000000;" />
+ <stop
+ id="stop4046"
+ offset="1.0000000"
+ style="stop-color:#363636;stop-opacity:0.18750000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3418">
+ <stop
+ id="stop3419"
+ offset="0.0000000"
+ style="stop-color:#f7f7f7;stop-opacity:1.0000000;" />
+ <stop
+ id="stop3420"
+ offset="1.0000000"
+ style="stop-color:#dedede;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2791">
+ <stop
+ id="stop2792"
+ offset="0.0000000"
+ style="stop-color:#fbfbfb;stop-opacity:1.0000000;" />
+ <stop
+ id="stop2793"
+ offset="1.0000000"
+ style="stop-color:#e9e9e9;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ y2="0.96103895"
+ x2="0.49079755"
+ y1="0.058441557"
+ x1="0.49693251"
+ id="linearGradient2794"
+ xlink:href="#linearGradient2791"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="0.98051947"
+ x2="0.53254437"
+ y1="0.012987013"
+ x1="0.53846157"
+ id="linearGradient3417"
+ xlink:href="#linearGradient3418"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="0.99350649"
+ x2="0.49689442"
+ y1="0.012987013"
+ x1="0.49689442"
+ id="linearGradient4043"
+ xlink:href="#linearGradient4044"
+ inkscape:collect="always" />
+ </defs>
+ <sodipodi:namedview
+ inkscape:current-layer="svg1"
+ showguides="true"
+ inkscape:window-y="27"
+ inkscape:window-x="0"
+ guidetolerance="1.0000000mm"
+ inkscape:guide-points="true"
+ inkscape:guide-bbox="true"
+ gridtolerance="1.0000000px"
+ inkscape:grid-bbox="true"
+ inkscape:grid-points="true"
+ showgrid="true"
+ showborder="true"
+ inkscape:window-height="971"
+ inkscape:window-width="1270"
+ inkscape:cy="120.2872"
+ inkscape:cx="85.487865"
+ inkscape:zoom="4.4593316"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0000000"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:window-maximized="0">
+ <sodipodi:guide
+ id="guide5924"
+ position="23.994627"
+ orientation="vertical" />
+ <sodipodi:guide
+ id="guide5925"
+ position="58.080453"
+ orientation="vertical" />
+ <sodipodi:guide
+ id="guide5926"
+ position="92.166278"
+ orientation="vertical" />
+ <sodipodi:guide
+ id="guide5927"
+ position="126.25210"
+ orientation="vertical" />
+ <inkscape:grid
+ id="GridFromPre046Settings"
+ type="xygrid"
+ originx="0.50000000mm"
+ originy="0.50000000mm"
+ spacingx="1.0000000mm"
+ spacingy="1.0000000mm"
+ color="#3f3fff"
+ empcolor="#3f3fff"
+ opacity="0.15"
+ empopacity="0.38"
+ empspacing="5" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="23.040251"
+ x="23.031496"
+ height="177.15660"
+ width="184.25197"
+ id="rect4047"
+ style="fill:url(#linearGradient4043);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="23.031490"
+ x="26.574802"
+ height="173.62204"
+ width="177.16536"
+ id="rect3421"
+ style="fill:url(#linearGradient4043);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="26.554472"
+ x="30.118111"
+ height="159.80026"
+ width="170.38249"
+ id="rect2169"
+ style="fill:url(#linearGradient2794);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5262673;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="31.699234"
+ x="31.955462"
+ height="149.19994"
+ width="163.39728"
+ id="rect3416"
+ style="fill:url(#linearGradient3417);fill-opacity:0.74901998;fill-rule:evenodd;stroke:none;stroke-width:3.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <rect
+ ry="14.164467"
+ rx="17.594519"
+ y="26.574797"
+ x="29.993284"
+ height="159.80026"
+ width="170.38249"
+ id="rect5928"
+ style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.5262673;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-ydpi="31.261538" />
+ <g
+ id="g3551"
+ transform="matrix(0,-1,-1,0,224.86875,224.86875)">
+ <path
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ id="path10050-8"
+ d="m 67.531704,87.881908 c 0,85.120972 -0.41774,85.120972 -0.41774,85.120972"
+ style="fill:none;stroke:#0000c2;stroke-width:3.46500993;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ inkscape:connector-curvature="0" />
+ <rect
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ y="167.64879"
+ x="61.412212"
+ height="11.821243"
+ width="11.821243"
+ id="rect11925-1"
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" />
+ <path
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ id="path10050"
+ d="m 164.76378,39.856732 c 0,109.542498 -0.33944,109.542498 -0.33944,109.542498"
+ style="fill:none;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ inkscape:connector-curvature="0" />
+ <rect
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ y="34.241741"
+ x="158.68343"
+ height="11.821243"
+ width="11.821243"
+ id="rect11924"
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" />
+ <rect
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ y="144.08427"
+ x="158.68343"
+ height="11.821243"
+ width="11.821243"
+ id="rect11925"
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" />
+ <rect
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ y="131.14046"
+ x="176.22049"
+ height="11.821243"
+ width="11.821243"
+ id="rect11924-8"
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" />
+ <rect
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ y="160.02914"
+ x="176.22049"
+ height="11.821243"
+ width="11.821243"
+ id="rect11925-7"
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" />
+ <path
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ id="path10050-6"
+ d="m 114.25092,87.476474 c 0,61.442136 -0.53886,61.442136 -0.53886,61.442136"
+ style="fill:none;stroke:#0000c2;stroke-width:3.34384537;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ inkscape:connector-curvature="0" />
+ <rect
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ y="78.533081"
+ x="108.07087"
+ height="11.821243"
+ width="11.821243"
+ id="rect11924-3"
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" />
+ <rect
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ y="143.50395"
+ x="108.07087"
+ height="11.821243"
+ width="11.821243"
+ id="rect11925-2"
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" />
+ <rect
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ y="82.473633"
+ x="61.412212"
+ height="11.821243"
+ width="11.821243"
+ id="rect11924-9"
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" />
+ <path
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ id="path10050-31"
+ d="m 54.103493,43.704879 c 0,85.120961 -0.41774,85.120961 -0.41774,85.120961"
+ style="fill:none;stroke:#0000c2;stroke-width:3.4650104;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ inkscape:connector-curvature="0" />
+ <rect
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ y="39.193604"
+ x="47.984001"
+ height="11.821243"
+ width="11.821243"
+ id="rect11924-89"
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" />
+ <rect
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ y="122.57477"
+ x="47.984001"
+ height="11.821243"
+ width="11.821243"
+ id="rect11925-0"
+ style="fill:#0000c2;fill-opacity:1;stroke:#0000c2;stroke-width:3.54330707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" />
+ <path
+ inkscape:export-ydpi="31.261538"
+ inkscape:export-xdpi="31.261538"
+ inkscape:export-filename="/home/jean/devel/goffice/plugins/plot_xy/chart_minmax_2_3.png"
+ id="path10050-84"
+ d="m 182.59138,137.63218 c 0,28.22387 -0.92052,28.22387 -0.92052,28.22387"
+ style="fill:none;stroke:#0000c2;stroke-width:2.96213007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/plugins/plot_xy/gog-xy-minmax.c b/plugins/plot_xy/gog-xy-minmax.c
new file mode 100644
index 0000000..a64e211
--- /dev/null
+++ b/plugins/plot_xy/gog-xy-minmax.c
@@ -0,0 +1,506 @@
+/*
+ * gog-xy-minmax.c
+ *
+ * Copyright (C) 2012
+ * Jean Brefort (jean brefort normalesup org)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include <goffice/goffice-config.h>
+#include "gog-xy-minmax.h"
+
+#include <glib/gi18n-lib.h>
+#include <gsf/gsf-impl-utils.h>
+
+struct _GogXYMinMaxPlot {
+ GogPlot base;
+
+ gboolean horizontal;
+ gboolean default_style_has_markers;
+ struct axes_data {
+ double minima, maxima;
+ GOFormat const *fmt;
+ GODateConventions const *date_conv;
+ } x, y;
+};
+
+enum {
+ XY_MINMAX_PROP_0,
+ XY_MINMAX_PROP_HORIZONTAL,
+ XY_MINMAX_PROP_DEFAULT_STYLE_HAS_MARKERS
+};
+
+static GogObjectClass *gog_xy_minmax_parent_klass;
+
+static GType gog_xy_minmax_series_get_type (void);
+static GType gog_xy_minmax_view_get_type (void);
+
+typedef GogSeries GogXYMinMaxSeries;
+typedef GogSeriesClass GogXYMinMaxSeriesClass;
+
+static GogObjectClass *series_parent_klass;
+
+static void
+gog_xy_minmax_series_init_style (GogStyledObject *gso, GOStyle *style)
+{
+ GogSeries *series = GOG_SERIES (gso);
+ GogXYMinMaxPlot const *plot;
+
+ ((GogStyledObjectClass *)series_parent_klass)->init_style (gso, style);
+ if (series->plot == NULL)
+ return;
+
+ plot = GOG_XY_MINMAX_PLOT (series->plot);
+ if (!plot->default_style_has_markers) {
+ style->disable_theming |= GO_STYLE_MARKER;
+ if (style->marker.auto_shape) {
+ GOMarker *m = go_marker_new ();
+ go_marker_set_shape (m, GO_MARKER_NONE);
+ go_style_set_marker (style, m);
+ }
+ }
+}
+
+static void
+gog_xy_minmax_series_update (GogObject *obj)
+{
+ const double *x_vals, *y_vals, *z_vals;
+ GogSeries *series = GOG_SERIES (obj);
+ unsigned old_num = series->num_elements;
+
+ series->num_elements = gog_series_get_xyz_data (series,
+ &x_vals, &y_vals, &z_vals);
+ /* queue plot for redraw */
+ gog_object_request_update (GOG_OBJECT (series->plot));
+ if (old_num != series->num_elements)
+ gog_plot_request_cardinality_update (series->plot);
+
+ if (series_parent_klass->update)
+ series_parent_klass->update (obj);
+}
+
+static void
+gog_xy_minmax_series_class_init (GogObjectClass *gog_klass)
+{
+ GogStyledObjectClass *gso_klass = (GogStyledObjectClass *) gog_klass;
+ series_parent_klass = g_type_class_peek_parent (gso_klass);
+ gog_klass->update = gog_xy_minmax_series_update;
+ gso_klass->init_style = gog_xy_minmax_series_init_style;
+}
+
+GSF_DYNAMIC_CLASS (GogXYMinMaxSeries, gog_xy_minmax_series,
+ gog_xy_minmax_series_class_init, NULL,
+ GOG_TYPE_SERIES)
+
+/*****************************************************************************/
+
+static void
+gog_xy_minmax_plot_clear_formats (GogXYMinMaxPlot *plot)
+{
+ go_format_unref (plot->x.fmt);
+ plot->x.fmt = NULL;
+
+ go_format_unref (plot->y.fmt);
+ plot->y.fmt = NULL;
+}
+
+static void
+gog_xy_minmax_plot_set_property (GObject *obj, guint param_id,
+ GValue const *value, GParamSpec *pspec)
+{
+ GogXYMinMaxPlot *minmax = GOG_XY_MINMAX_PLOT (obj);
+
+ switch (param_id) {
+ case XY_MINMAX_PROP_HORIZONTAL:
+ minmax->horizontal = g_value_get_boolean (value);
+ break;
+
+ case XY_MINMAX_PROP_DEFAULT_STYLE_HAS_MARKERS:
+ minmax->default_style_has_markers = g_value_get_boolean (value);
+ break;
+
+ default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
+ return; /* NOTE : RETURN */
+ }
+ gog_object_emit_changed (GOG_OBJECT (obj), TRUE);
+}
+
+static void
+gog_xy_minmax_plot_get_property (GObject *obj, guint param_id,
+ GValue *value, GParamSpec *pspec)
+{
+ GogXYMinMaxPlot *minmax = GOG_XY_MINMAX_PLOT (obj);
+
+ switch (param_id) {
+ case XY_MINMAX_PROP_HORIZONTAL:
+ g_value_set_boolean (value, minmax->horizontal);
+ break;
+ case XY_MINMAX_PROP_DEFAULT_STYLE_HAS_MARKERS:
+ g_value_set_boolean (value, minmax->default_style_has_markers);
+ break;
+ default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
+ break;
+ }
+}
+
+static char const *
+gog_xy_minmax_plot_type_name (G_GNUC_UNUSED GogObject const *item)
+{
+ /* xgettext : the base for how to name min/max line plot objects
+ * eg The 2nd min/max line plot in a chart will be called
+ * PlotMinMax2 */
+ return N_("PlotXYMinMax");
+}
+
+static void
+gog_xy_minmax_plot_update (GogObject *obj)
+{
+ GogXYMinMaxPlot *model = GOG_XY_MINMAX_PLOT (obj);
+ GogSeries const *series = NULL;
+ double x_min, x_max, y_min, y_max, tmp_min, tmp_max;
+ GSList *ptr;
+ struct axes_data *realx, *realy;
+
+ if (model->horizontal) {
+ realx = &model->y;
+ realy = &model->x;
+ } else {
+ realx = &model->x;
+ realy = &model->y;
+ }
+ x_min = y_min = DBL_MAX;
+ x_max = y_max = -DBL_MAX;
+ gog_xy_minmax_plot_clear_formats (model);
+ for (ptr = model->base.series ; ptr != NULL ; ptr = ptr->next) {
+ series = ptr->data;
+ if (!gog_series_is_valid (GOG_SERIES (series)))
+ continue;
+
+ go_data_get_bounds (series->values[1].data, &tmp_min, &tmp_max);
+ if (y_min > tmp_min) y_min = tmp_min;
+ if (y_max < tmp_max) y_max = tmp_max;
+ if (realy->fmt == NULL) {
+ realy->fmt = go_data_preferred_fmt (series->values[1].data);
+ realy->date_conv = go_data_date_conv (series->values[1].data);
+ }
+ go_data_get_bounds (series->values[2].data, &tmp_min, &tmp_max);
+ if (y_min > tmp_min)
+ y_min = tmp_min;
+ if (y_max < tmp_max)
+ y_max = tmp_max;
+
+ if (series->values[0].data != NULL) {
+ go_data_get_bounds (series->values[0].data, &tmp_min, &tmp_max);
+
+ if (!go_finite (tmp_min) || !go_finite (tmp_max) ||
+ tmp_min > tmp_max) {
+ tmp_min = 0;
+ tmp_max = go_data_get_vector_size (series->values[1].data);
+
+ } else if (model->x.fmt == NULL) {
+ realx->fmt = go_data_preferred_fmt (series->values[0].data);
+ realy->date_conv = go_data_date_conv (series->values[0].data);
+ }
+ } else {
+ tmp_min = 0;
+ tmp_max = go_data_get_vector_size (series->values[1].data);
+ }
+
+ if (x_min > tmp_min)
+ x_min = tmp_min;
+ if (x_max < tmp_max)
+ x_max = tmp_max;
+ }
+ if (realx->minima != x_min || realx->maxima != x_max) {
+ realx->minima = x_min;
+ realx->maxima = x_max;
+ gog_axis_bound_changed (model->base.axis[0], GOG_OBJECT (model));
+ }
+ if (realy->minima != y_min || realy->maxima != y_max) {
+ realy->minima = y_min;
+ realy->maxima = y_max;
+ gog_axis_bound_changed (model->base.axis[1], GOG_OBJECT (model));
+ }
+ gog_object_emit_changed (GOG_OBJECT (obj), FALSE);
+ if (gog_xy_minmax_parent_klass->update)
+ gog_xy_minmax_parent_klass->update (obj);
+}
+
+static GOData *
+gog_xy_minmax_axis_get_bounds (GogPlot *plot, GogAxisType axis,
+ GogPlotBoundInfo *bounds)
+{
+ GogXYMinMaxPlot *model = GOG_XY_MINMAX_PLOT (plot);
+
+ if ((model->horizontal && axis == GOG_AXIS_Y) || (!model->horizontal && axis == GOG_AXIS_X)) {
+ GSList *ptr;
+
+ bounds->val.minima = model->x.minima;
+ bounds->val.maxima = model->x.maxima;
+ bounds->is_discrete = model->x.minima > model->x.maxima ||
+ !go_finite (model->x.minima) ||
+ !go_finite (model->x.maxima);
+ if (bounds->fmt == NULL && model->x.fmt != NULL)
+ bounds->fmt = go_format_ref (model->x.fmt);
+ if (model->x.date_conv)
+ bounds->date_conv = model->x.date_conv;
+
+ for (ptr = plot->series; ptr != NULL ; ptr = ptr->next)
+ if (gog_series_is_valid (GOG_SERIES (ptr->data)))
+ return GOG_SERIES (ptr->data)->values[0].data;
+ return NULL;
+ }
+
+ if ((model->horizontal && axis == GOG_AXIS_X) || (!model->horizontal && axis == GOG_AXIS_Y)) {
+ bounds->val.minima = model->y.minima;
+ bounds->val.maxima = model->y.maxima;
+ if (bounds->fmt == NULL && model->y.fmt != NULL)
+ bounds->fmt = go_format_ref (model->y.fmt);
+ if (model->y.date_conv)
+ bounds->date_conv = model->y.date_conv;
+ }
+ return NULL;
+}
+
+static void
+gog_xy_minmax_plot_class_init (GogPlotClass *plot_klass)
+{
+ GObjectClass *gobject_klass = (GObjectClass *) plot_klass;
+ GogObjectClass *gog_object_klass = (GogObjectClass *) plot_klass;
+ gog_xy_minmax_parent_klass = g_type_class_peek_parent (plot_klass);
+
+ gobject_klass->set_property = gog_xy_minmax_plot_set_property;
+ gobject_klass->get_property = gog_xy_minmax_plot_get_property;
+
+ g_object_class_install_property (gobject_klass, XY_MINMAX_PROP_HORIZONTAL,
+ g_param_spec_boolean ("horizontal",
+ _("Horizontal"),
+ _("Horizontal or vertical lines"),
+ FALSE,
+ G_PARAM_READWRITE | GO_PARAM_PERSISTENT));
+ g_object_class_install_property (gobject_klass, XY_MINMAX_PROP_DEFAULT_STYLE_HAS_MARKERS,
+ g_param_spec_boolean ("default-style-has-markers",
+ _("Default markers"),
+ _("Should the default style of a series include markers"),
+ FALSE,
+ GSF_PARAM_STATIC | G_PARAM_READWRITE | GO_PARAM_PERSISTENT));
+
+ gog_object_klass->type_name = gog_xy_minmax_plot_type_name;
+ gog_object_klass->update = gog_xy_minmax_plot_update;
+ gog_object_klass->view_type = gog_xy_minmax_view_get_type ();
+
+ {
+ static GogSeriesDimDesc dimensions[] = {
+ { N_("Positions"), GOG_SERIES_SUGGESTED, FALSE,
+ GOG_DIM_INDEX, GOG_MS_DIM_CATEGORIES },
+ { N_("Min"), GOG_SERIES_REQUIRED, FALSE,
+ GOG_DIM_VALUE, GOG_MS_DIM_LOW },
+ { N_("Max"), GOG_SERIES_REQUIRED, FALSE,
+ GOG_DIM_VALUE, GOG_MS_DIM_HIGH },
+ };
+ plot_klass->desc.series.dim = dimensions;
+ plot_klass->desc.series.num_dim = G_N_ELEMENTS (dimensions);
+ }
+ plot_klass->desc.series.style_fields = GO_STYLE_LINE | GO_STYLE_MARKER;
+ plot_klass->axis_set = GOG_AXIS_SET_XY;
+ plot_klass->axis_get_bounds = gog_xy_minmax_axis_get_bounds;
+ plot_klass->series_type = gog_xy_minmax_series_get_type ();
+
+}
+
+static void
+gog_xy_minmax_plot_init (GogXYMinMaxPlot *minmax)
+{
+ minmax->default_style_has_markers = FALSE;
+}
+
+GSF_DYNAMIC_CLASS (GogXYMinMaxPlot, gog_xy_minmax_plot,
+ gog_xy_minmax_plot_class_init, gog_xy_minmax_plot_init,
+ GOG_TYPE_PLOT)
+
+/*****************************************************************************/
+typedef GogPlotView GogXYMinMaxView;
+typedef GogPlotViewClass GogXYMinMaxViewClass;
+
+
+static void
+path_move_to (void *closure, GOPathPoint const *point)
+{
+ gog_renderer_draw_marker (GOG_RENDERER (closure), point->x, point->y);
+}
+
+static void
+path_curve_to (void *closure,
+ GOPathPoint const *point0,
+ GOPathPoint const *point1,
+ GOPathPoint const *point2)
+{
+ gog_renderer_draw_marker (GOG_RENDERER (closure), point2->x, point2->y);
+}
+
+static void
+path_close_path (void *closure)
+{
+}
+
+static void
+gog_xy_minmax_view_render (GogView *view, GogViewAllocation const *bbox)
+{
+ GogXYMinMaxPlot const *model = GOG_XY_MINMAX_PLOT (view->model);
+ GogPlot *plot = GOG_PLOT (model);
+ GogXYMinMaxSeries const *series;
+ GogSeries const *base_series;
+ GogAxisMap *x_map, *y_map;
+ gboolean is_vertical = ! (model->horizontal);
+ double *max_vals, *min_vals, *pos;
+ double x, xmapped, minmapped, maxmapped;
+ unsigned i, j;
+ unsigned num_series;
+ GSList *ptr;
+ unsigned n, tmp;
+ GOPath *path, *Mpath, *mpath;
+ GOStyle * style;
+ gboolean prec_valid;
+
+ for (num_series = 0, ptr = plot->series ; ptr != NULL ; ptr = ptr->next, num_series++);
+ if (num_series < 1)
+ return;
+
+ if (num_series <= 0)
+ return;
+
+ x_map = gog_axis_map_new (GOG_PLOT (model)->axis[0],
+ view->allocation.x, view->allocation.w);
+ y_map = gog_axis_map_new (GOG_PLOT (model)->axis[1], view->allocation.y + view->allocation.h,
+ -view->allocation.h);
+
+ if (!(gog_axis_map_is_valid (x_map) &&
+ gog_axis_map_is_valid (y_map))) {
+ gog_axis_map_free (x_map);
+ gog_axis_map_free (y_map);
+ return;
+ }
+
+
+ path = go_path_new ();
+ go_path_set_options (path, GO_PATH_OPTIONS_SHARP);
+
+ for (ptr = plot->series ; ptr != NULL ; ptr = ptr->next) {
+ series = ptr->data;
+ base_series = GOG_SERIES (series);
+ if (!gog_series_is_valid (base_series))
+ continue;
+ style = go_styled_object_get_style (GO_STYLED_OBJECT (series));
+ pos = go_data_get_values (base_series->values[0].data);
+ n = go_data_get_vector_size (base_series->values[0].data);
+ min_vals = go_data_get_values (base_series->values[1].data);
+ tmp = go_data_get_vector_size (base_series->values[1].data);
+ if (n > tmp)
+ n = tmp;
+ max_vals = go_data_get_values (base_series->values[2].data);
+ tmp = go_data_get_vector_size (base_series->values[2].data);
+ if (n > tmp)
+ n = tmp;
+ mpath = go_path_new ();
+ Mpath = go_path_new ();
+ go_path_set_options (mpath, GO_PATH_OPTIONS_SHARP);
+ go_path_set_options (Mpath, GO_PATH_OPTIONS_SHARP);
+ gog_renderer_push_style (view->renderer, style);
+ j = 0;
+ prec_valid = FALSE;
+
+ for (i = 0; i < n; i++) {
+ x = (pos)? pos[i]: i;
+ if (is_vertical) {
+ if (!gog_axis_map_finite (x_map, x) ||
+ !gog_axis_map_finite (y_map, min_vals[i]) ||
+ !gog_axis_map_finite (y_map, max_vals[i])) {
+ prec_valid = FALSE;
+ continue;
+ }
+ xmapped = gog_axis_map_to_view (x_map, x);
+ minmapped = gog_axis_map_to_view (y_map, min_vals[i]);
+ maxmapped = gog_axis_map_to_view (y_map, max_vals[i]);
+ go_path_move_to (path, xmapped, minmapped);
+ go_path_line_to (path, xmapped, maxmapped);
+ if (prec_valid) {
+ go_path_line_to (mpath, xmapped, minmapped);
+ go_path_line_to (Mpath, xmapped, maxmapped);
+ } else {
+ go_path_move_to (mpath, xmapped, minmapped);
+ go_path_move_to (Mpath, xmapped, maxmapped);
+ }
+ } else {
+ if (!gog_axis_map_finite (y_map, x) ||
+ !gog_axis_map_finite (x_map, min_vals[i]) ||
+ !gog_axis_map_finite (x_map, max_vals[i])) {
+ prec_valid = FALSE;
+ continue;
+ }
+ xmapped = gog_axis_map_to_view (y_map, x);
+ minmapped = gog_axis_map_to_view (x_map, min_vals[i]);
+ maxmapped = gog_axis_map_to_view (x_map, max_vals[i]);
+ go_path_move_to (path, minmapped, xmapped);
+ go_path_line_to (path, maxmapped, xmapped);
+ if (prec_valid) {
+ go_path_line_to (mpath, minmapped, xmapped);
+ go_path_line_to (Mpath, maxmapped, xmapped);
+ } else {
+ go_path_move_to (mpath, minmapped, xmapped);
+ go_path_move_to (Mpath, maxmapped, xmapped);
+ }
+ }
+ gog_renderer_stroke_serie (view->renderer, path);
+ go_path_clear (path);
+ prec_valid = TRUE;
+ j++;
+ }
+ if (go_style_is_marker_visible (style))
+ for (i = 0; i < j; i++) {
+ go_path_interpret (mpath, GO_PATH_DIRECTION_FORWARD,
+ path_move_to,
+ path_move_to,
+ path_curve_to,
+ path_close_path,
+ view->renderer);
+ go_path_interpret (Mpath, GO_PATH_DIRECTION_FORWARD,
+ path_move_to,
+ path_move_to,
+ path_curve_to,
+ path_close_path,
+ view->renderer);
+ }
+ gog_renderer_pop_style (view->renderer);
+ go_path_free (Mpath);
+ go_path_free (mpath);
+ }
+
+ go_path_free (path);
+ gog_axis_map_free (x_map);
+ gog_axis_map_free (y_map);
+}
+
+static void
+gog_xy_minmax_view_class_init (GogViewClass *view_klass)
+{
+ view_klass->render = gog_xy_minmax_view_render;
+ view_klass->clip = TRUE;
+}
+
+GSF_DYNAMIC_CLASS (GogXYMinMaxView, gog_xy_minmax_view,
+ gog_xy_minmax_view_class_init, NULL,
+ GOG_TYPE_PLOT_VIEW)
diff --git a/plugins/plot_xy/gog-xy-minmax.h b/plugins/plot_xy/gog-xy-minmax.h
new file mode 100644
index 0000000..ea9c50f
--- /dev/null
+++ b/plugins/plot_xy/gog-xy-minmax.h
@@ -0,0 +1,44 @@
+/*
+ * gog-xy-minmax.h
+ *
+ * Copyright (C) 2012
+ * Jean Brefort (jean brefort normalesup org)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef GOG_XY_MINMAX_H
+#define GOG_XY_MINMAX_H
+
+#include <goffice/goffice.h>
+
+G_BEGIN_DECLS
+
+typedef struct _GogXYMinMaxPlot GogXYMinMaxPlot;
+typedef GogPlotClass GogXYMinMaxPlotClass;
+
+#define GOG_TYPE_XY_MINMAX_PLOT (gog_xy_minmax_plot_get_type ())
+#define GOG_XY_MINMAX_PLOT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOG_TYPE_XY_MINMAX_PLOT, GogXYMinMaxPlot))
+#define GOG_IS_PLOT_XY_MINMAX(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOG_TYPE_XY_MINMAX_PLOT))
+
+GType gog_xy_minmax_plot_get_type (void);
+void gog_xy_minmax_plot_register_type (GTypeModule *module);
+void gog_xy_minmax_view_register_type (GTypeModule *module);
+void gog_xy_minmax_series_register_type (GTypeModule *module);
+
+G_END_DECLS
+
+#endif /* GOG_XY_MINMAX_H */
diff --git a/plugins/plot_xy/gog-xy.c b/plugins/plot_xy/gog-xy.c
index 2010f30..76ccdc0 100644
--- a/plugins/plot_xy/gog-xy.c
+++ b/plugins/plot_xy/gog-xy.c
@@ -22,24 +22,7 @@
#include <goffice/goffice-config.h>
#include "gog-xy.h"
#include "gog-xy-dropbar.h"
-#include <goffice/graph/gog-view.h>
-#include <goffice/graph/gog-renderer.h>
-#include <goffice/graph/gog-theme.h>
-#include <goffice/graph/gog-axis.h>
-#include <goffice/graph/gog-error-bar.h>
-#include <goffice/graph/gog-chart.h>
-#include <goffice/graph/gog-chart-map.h>
-#include <goffice/graph/gog-series-lines.h>
-#include <goffice/data/go-data.h>
-#include <goffice/data/go-data-simple.h>
-#include <goffice/utils/go-color.h>
-#include <goffice/utils/go-marker.h>
-#include <goffice/utils/go-format.h>
-#include <goffice/math/go-math.h>
-#include <goffice/utils/go-line.h>
-#include <goffice/utils/go-persist.h>
-#include <goffice/utils/go-style.h>
-#include <goffice/utils/go-styled-object.h>
+#include "gog-xy-minmax.h"
#include <goffice/app/module-plugin-defs.h>
#ifdef GOFFICE_WITH_GTK
@@ -2235,6 +2218,9 @@ go_plugin_init (GOPlugin *plugin, GOCmdContext *cc)
gog_xy_dropbar_plot_register_type (module);
gog_xy_dropbar_view_register_type (module);
gog_xy_dropbar_series_register_type (module);
+ gog_xy_minmax_plot_register_type (module);
+ gog_xy_minmax_view_register_type (module);
+ gog_xy_minmax_series_register_type (module);
register_embedded_stuff ();
}
diff --git a/plugins/plot_xy/plot-types.xml.in b/plugins/plot_xy/plot-types.xml.in
index cf6eef2..5734444 100644
--- a/plugins/plot_xy/plot-types.xml.in
+++ b/plugins/plot_xy/plot-types.xml.in
@@ -80,7 +80,7 @@
<property name="guru-hints">backplane</property>
</Type>
- <!-- Drop bars are bars goint from an initial position
+ <!-- Drop bars are bars going from an initial position
to a final position; the fill color is inverted when final position is lower
than the initial position; they may be used in stock plots. -->
<Type _name="Scattered Vertical Drop Bars" row="1" col="3"
@@ -88,7 +88,7 @@
_description="Vertical drop bars with continuous X-axis."
sample_image_file="res:go:plot_xy/chart_dropbar_1_3.png">
<property name="horizontal">False</property>
- <property name="guru-hints">backplane</property>
+ <property name="guru-hints">backplane</property>
</Type>
<Type _name="Scattered Horizontal Drop Bars" row="1" col="4"
engine="GogXYDropBarPlot" family="DropBar"
@@ -97,4 +97,36 @@
<property name="horizontal">True</property>
<property name="guru-hints">backplane</property>
</Type>
+ <Type _name="Scattered Vertical Min Max Lines" row="1" col="3"
+ engine="GogXYMinMaxPlot" family="MinMax"
+ _description="Vertical Min Max lines with continuous X-axis."
+ sample_image_file="res:go:plot_xy/chart_minmax_1_3.png">
+ <property name="horizontal">False</property>
+ <property name="default-style-has-markers">False</property>
+ <property name="guru-hints">backplane</property>
+ </Type>
+ <Type _name="Scattered Marked Vertical Min Max Lines" row="1" col="4"
+ engine="GogXYMinMaxPlot" family="MinMax"
+ _description="Vertical Min Max lines with markers and a continuous X-axis."
+ sample_image_file="res:go:plot_xy/chart_minmax_1_4.png">
+ <property name="horizontal">False</property>
+ <property name="default-style-has-markers">True</property>
+ <property name="guru-hints">backplane</property>
+ </Type>
+ <Type _name="Scattered Horizontal Min Max Lines" row="2" col="3"
+ engine="GogXYMinMaxPlot" family="MinMax"
+ _description="Horizontal Min Max lines with continuous Y-axis."
+ sample_image_file="res:go:plot_xy/chart_minmax_2_3.png">
+ <property name="horizontal">True</property>
+ <property name="default-style-has-markers">False</property>
+ <property name="guru-hints">backplane</property>
+ </Type>
+ <Type _name="Scattered Marked Horizontal Min Max Lines" row="2" col="4"
+ engine="GogXYMinMaxPlot" family="MinMax"
+ _description="Horizontal Min Max lines with markers and a continuous Y-axis."
+ sample_image_file="res:go:plot_xy/chart_minmax_2_4.png">
+ <property name="horizontal">True</property>
+ <property name="default-style-has-markers">True</property>
+ <property name="guru-hints">backplane</property>
+ </Type>
</Types>
diff --git a/plugins/plot_xy/plugin.xml.in b/plugins/plot_xy/plugin.xml.in
index 1334443..973142b 100644
--- a/plugins/plot_xy/plugin.xml.in
+++ b/plugins/plot_xy/plugin.xml.in
@@ -46,5 +46,10 @@
<_description>Scattered dropbar plotting engine</_description>
</information>
</service>
+ <service type="plot_engine" id="GogXYMinMaxPlot">
+ <information>
+ <_description>Scattered Min Max plotting engine</_description>
+ </information>
+ </service>
</services>
</plugin>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]