-
Notifications
You must be signed in to change notification settings - Fork 17
Description
As of today, hipsterplot "prints" its plots with trailing whitespaces. I think it shouldn't, and my use case is the use of hipsterplot as doctests.
I'm using hipsterplot on PyScanPrev to help me use the examples as a test suite. Today, the Single Pole Lowpass IIR filter and the State-space model examples require hipsterplot, and that gave me some headache due to the trailing whitespaces (as I configure my editor to trim them), which I fixed on this commit by patching hipsterplot to use an alternative printer.
It can be as easy as that patch, hipsterplot can have a print("<some string stuff>".rstrip()) or use an alternative print function. But there are other approaches, e.g. using (optional) delimiters on the plots, or even making the trailing whitespaces something optional using a flag as a keyword argument. What do you think?