Skip to content

Vignettes: Legend points missing from custom "log" type example #532

@grantmcdermott

Description

@grantmcdermott

See the two plots here: https://grantmcdermott.com/tinyplot/vignettes/types.html#a-minimal-example

I'm a little reticent to fix this automagically with special logic in compute_legend_args, since we're trying to get away from that (c.f., #531).

One simple solution would be to change to name = "p" (from name = "log"), so that the legend for this example inherits from the default points behaviour. We would have to explain this in the text, but maybe that's a good idea anyway since we want users to leverage the scaffolding of "primitive" types for their custom types?

Another option would be to add an explicit settings$legend_args$pch = par("pch") assignment just after the datapoints one. Again, this would have to be explained, though.

Thoughts @vincentarelbundock?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions