slaclab / pydm

Python Display Manager
http://slaclab.github.io/pydm/
Other
111 stars 76 forks source link

Simplify using CurveItem subclasses in Plot subclasses #1042

Closed flowln closed 8 months ago

flowln commented 9 months ago

While making subclasses for TimePlot and WaveformPlot for my application, I noticed this little inconvenience with non-TimePlot plots. I think it's a good thing to have a factory method such as this in every plot! :slightly_smiling_face:

I kept it as close as possible to the one in TimePlot, so as to not change more stuff than needed, though I figured it may be even better to pass a generic *args, **kwargs to the createCurveItem functions, so as to not constrain the signature of the CurveItem custom implementations. What do you think?

YektaY commented 8 months ago

We agree, the change to pass a generic *args, **kwargs would be beneficial. Would you like to implement that with this PR?