plot icon indicating copy to clipboard operation
plot copied to clipboard

Need better example for drawing legends outside of the grid

Open dkegel-fastly opened this issue 9 months ago • 1 comments

https://github.com/gonum/plot/issues/133 pointed to the heatmap example, but the legend offset code is inscrutable to a newbie like me. I suspect that example is only useful if you actually understand gonum/plot already.

A clear example showing a simple scatterplot with one point and one label, and then the same example with the legend outside the box, would be quite helpful.

I even tried Google Gemini, but it confidently provided an example that did not work.

dkegel-fastly avatar May 26 '25 18:05 dkegel-fastly

Maybe start with https://pkg.go.dev/gonum.org/v1/plot/plotter#example-Scatter-Color.

scatter colour

Take this and explore what changes to the code do to the plot.

I even tried Google Gemini, but it confidently provided an example that did not work.

This is entirely unsurprising; Xuanzang's journey would have been far less important if he had not travelled on foot.

kortschak avatar May 26 '25 19:05 kortschak