Thanks for the hard work Yan, but I'd like to turn this into a feature
request!
I've gone and made the changes myself :-)
1. I added an option "x-axis" for the fill in setting/collections.py
2. Then updated widgets/points.py
3. First, fillPtsToEdge, _drawPlotLine and _drawBezierLine all need to
get the axes as an extra argument (only used in this file, so should be
ok to change the signature)
4. In _drawPlotLine:
elif ft == 'x-axis':
x1, x2 = pts[0].x(), pts[-1].x()
y1 = y2 = axes[1].dataToPlotterCoords(posn, 0)
5. In _drawBezierLine:
'x-axis': (
pts[0].x(),
axes[1].dataToPlotterCoords(posn, 0),
pts[-1].x(),
axes[1].dataToPlotterCoords(posn, 0)),
I didn't add the corresponding y-axis option, because this doesn't make
sense for functions of (x). Might be worth adding this if Veusz is
intended to do functions of y or parametric curves too.
Best regards,
Michael
P.S. If you're wondering what the use-case is, it's any time the area
under the curve is a meaningful quantity! I'm now using it to plot
currents, in a situation where the comparing total charge carried matters.
_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss