2010/3/4 Timo Heine timo.he...@gmail.com:
Basically what I want to do is to draw a horizontal line with relative y
co-ordinates and absolute xmin and xmax co-ordinate. Then I could draw a
line when a bit is high and have it always in plot area even when zooming
etc. Like axhline(...) but with
Hello,
I'v made a small program which plots data from a CAN-bus log file. Some of
the data to plot is logical type on/off values (bit on or off). I have tried
to find a way to plot this kind of data with no success.
Basically what I want to do is to draw a horizontal line with relative y
Do you want something like the attached?
I created it with my package that no-one wants :-(
import diagram_cl
import diagram_cl.kernels.tk
import numpy
import Tkinter
d1 = diagram_cl.Diagram()
series = (numpy.random.random(100) 0.5).astype(numpy.float)
for idx in xrange(0, len(series)):
Not sure what exactly you want. Is this close?
ax = subplot(111)
tr = ax.get_xaxis_transform()
ax.plot([0.2, 0.8], [0.5, 0.5],
transform=tr)
The x-coodinate is in data coordinate, but y coordinate is in
(normalized) axes coordinate.
More about the transforms behind matplotlib can be