From 00fe20b8e905ff73ec9660c03e7abaa1a5801ce1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Wobst?= Date: Mon, 22 May 2006 10:33:39 +0000 Subject: [PATCH] add key method for histogram style git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@2770 069f4177-920e-0410-937b-c2a4a81bcd90 --- CHANGES | 1 + pyx/graph/style.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index c79d71b4..6426a27a 100644 --- a/CHANGES +++ b/CHANGES @@ -96,6 +96,7 @@ TODO: - remove multiple painting of frompath in histogram and barpos styles - fix missing attribute select when using a bar style once only (reported by Alan Isaac) - fix histograms for negative y-coordinates (reported by Dominic Ford, bug #1492548) + - add key method for histogram style (reported by Hagemann, bug #1371554) - implement a changebar style (TODO: documentation) - graph, axis and style module: - support for mutual linking of axes between graphs diff --git a/pyx/graph/style.py b/pyx/graph/style.py index 69c7a49e..e547ce36 100644 --- a/pyx/graph/style.py +++ b/pyx/graph/style.py @@ -1192,6 +1192,10 @@ class histogram(_style): if privatedata.lineattrs is not None and len(privatedata.path): graph.draw(privatedata.path, privatedata.lineattrs) + def key_pt(self, privatedata, sharedata, graph, x_pt, y_pt, width_pt, height_pt): + if privatedata.lineattrs is not None: + graph.stroke(path.line_pt(x_pt, y_pt+0.5*height_pt, x_pt+width_pt, y_pt+0.5*height_pt), privatedata.lineattrs) + class barpos(_style): -- 2.11.4.GIT