Skip to content

Missing graticules when scales are missing #538

Description

@thomasp85

The work in #492 has a regression when only a geometry layer is present and positional scales have not been explicitly provided:

let lon_breaks = match scales.iter_mut().find(|s| s.aesthetic == "pos1") {
    Some(s) => { resolve_map_scale(s, geo_bbox.xrange()); s.numeric_breaks() }
    None => Vec::new(),
};

fails to find the non-existing pos1 scale that hasn't been created because only geometry has been mapped. We need to create default positional scales when they are missing from the mapping so that they can provide default breaks etc

Activity

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

Metadata

Metadata

Assignees

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