Skip to content

Need better example for drawing legends outside of the grid #802

Description

@dkegel-fastly

#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.

Activity

  1. kortschak commented on May 26, 2025

    @kortschak
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions