From: John H. <jdh...@ac...> - 2004-09-28 10:11:54
|
>>>>> "Peter" == Peter Groszkowski <pgr...@ge...> writes: Peter> doing this would be to incorporate it into the plot() Peter> command. Perhaps adding an option 'steps' (following Peter> gnuplot's convention could have steps equal 'histeps', Peter> 'fsteps' or just 'steps' - see link above.. None could mean Peter> regular plot() behavior). I would say this would be the Peter> most elegant option, but probably would call for John (or Peter> someone else from the core developers) to make the Peter> changes. Alternatively we could use above and wrap it in a Peter> plot_step() function. Peter> Any interest in this? If so which way do we want to go? It might be easiest to make this a line style. Then you could use the builtin kwarg linestyle plot(x, y, linestyle='steps') It shouldn't be too hard to modify lines.py to support this. If you want to take a stab at it, I'd be happy to include it. The nice thing about making it a line style is that the changes required would all be contained to the lines.py file which is simple and clear. If you change how plot processes its arguments, it's easy to foul things up. The only potential problem I see is this would prevent you from, for example, having a dashed stepped line, since dash is itself a line style. But who needs a dashed stepped line, for heaven's sake? JDH |