> I am trying to graph data that has an offset above zero (y axis). How can
> I center the data in the graph window? I tried using xmin and ymin but
> they only seems to work with negative numbers. I am new to VPython and I
> think it is great.
At present the only way to offset a graph is to offset the function:
xxx.plot(pos=(x,y+offset))
As you have seen, the graphing machinery currently uses xmin and ymin as
negative numbers in deciding how to handle the various quadrants. It is
reasonable to ask that this be made more general to handle offsets.
To be honest, I found it difficult to get the plotting to work properly
just in the current restricted sense and gave up at least temporarily on
generalizing that aspect. For example, how would I choose sensible tick
marks and labels if the offset is 1.73?
Glad you like VPython!
Bruce Sherwood
|