MakieOrg / Makie.jl

Interactive data visualizations and plotting in Julia
https://docs.makie.org/stable
MIT License
2.39k stars 303 forks source link

Document `Makie.spaces()` values #3796

Open jariji opened 5 months ago

jariji commented 5 months ago

Feature description

?scatter says

 •  space::Symbol = :data sets the transformation space for box encompassing the
   volume plot. See Makie.spaces() for possible inputs.

so

julia> Makie.spaces()
(:data, :pixel, :relative, :clip)

but that function isn't documented

help?> Makie.spaces()
  No documentation found.

  Makie.spaces is a Function.

so I don't know what those things mean.

asinghvi17 commented 5 months ago

If you want to PR this that would be great, they're pretty barebones explanations but better than nothing.

"""
        spaces()

Returns a tuple of defined and allowed coordinate spaces in Makie as symbols.

- `:data`: The space of input data, before applying `plot.transform`.  This is the space of the data you put in.
- `:pixel`: Direct pixel space on the screen, compensated for `px_per_unit` settings.  See `scene.viewport[]` for the pixel space boundingbox.
- `:relative`: Relative space goes from 0 to 1, bottom to top and left to right.  This is relative to the Scene or Axis a plot is located in.
- `:clip`: Similar to relative, but from -1 to 1 instead.  This is OpenGL clip space.
"""
matthewelmer commented 5 months ago

We should prolly remove See Makie.spaces() for possible inputs. from the documentation entirely until there's actually something to look for.

asinghvi17 commented 5 months ago

That would be the same amount of effort as PR'ing the explanation, though?

ffreyer commented 4 weeks ago

Related: #3202