plot
plot copied to clipboard
Why is `Plot.plotters` private ?
I'm super happy to use the plotutil
plot-making functions, but I'd also want to be able to tweak the plotters after the fact, simply changing colors or line size.. I see that the Plot.plotters
list of Plotters is internal only.. could we expose that somehow ? with a Plotters()
function or directly opening the Plotters
field ?
To have made a plot.Plot you must have had each of the plotters in your hand at some time. Can you not just modify them where you hold them (they are all pointer types). On the other hand, @eaburns, why is there an add rather than just appending to an exported slice?
I just read the source for Add and it's pretty clear that exposing the retainer plotters would be a bad idea; the plot calculates the min and max of each plotter's x and y values - user changes to these would break behaviour.
@abourget, you can still do what I said in retaining your pointers and mutating the plotters that way, but I don't think we should be encouraging that.
Dan, exactly. That's why.
Couldn't the plotutil Add functions return the plotters?
Le sam. 3 sept. 2016 09:03, Ethan Burns [email protected] a écrit :
Dan, exactly. That's why.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gonum/plot/issues/312#issuecomment-244545151, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFs8FM8SjOg93UdAY66OipdcrdHcFQrks5qmW_9gaJpZM4J0NL7 .
Maybe, but I forgot what those functions do, and I'm just on my phone right now.