Skip to content

Plot.rule + projection for meridians and parallels #1164

Open
@mbostock

Description

@mbostock
Member

If Plot.rule supported projection, like Plot.line does, we could use Plot.ruleX to render meridians and Plot.ruleY to render parallels. That’d be nice.

Activity

mbostock

mbostock commented on Dec 17, 2022

@mbostock
MemberAuthor

A rule typically extends across the opposite domain; e.g., a ruleY spans the domain of the x-scale. So when there is a projection, we would need to know the domain of the projection to know the extent of the rule (e.g., from -180 to +180).

And likewise we need to know whether the projection is spherical, because if it is, then ruleY will not produce geodesics and will need to be sampled with some precision to produce lines of constant latitude.

This suggests that we may need to expose additional information about the projection to marks. But this is not urgent because we already have Plot.graticule and we could easily add more convenience marks for spherical geometry.

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

    enhancementNew feature or requestgeoMaps and projections

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mbostock

        Issue actions

          Plot.rule + projection for meridians and parallels · Issue #1164 · observablehq/plot