scatter

AbstractPlotting.scatterFunction
scatter(positions)
scatter(x, y)
scatter(x, y, z)

Plots a marker for each element in (x, y, z), (x, y), or positions.

Attributes

Available attributes and their defaults for Scatter{T} where T are:

  ambient           Float32[0.55, 0.55, 0.55]
  color             :gray65
  colormap          :viridis
  colorrange        AbstractPlotting.Automatic()
  diffuse           Float32[0.4, 0.4, 0.4]
  distancefield     "nothing"
  glowcolor         RGBA{N0f8}(0.0,0.0,0.0,0.0)
  glowwidth         0.0
  lightposition     :eyeposition
  linewidth         1
  marker            Circle{T} where T
  marker_offset     AbstractPlotting.Automatic()
  markersize        10
  markerspace       Pixel
  nan_color         RGBA{Float32}(0.0f0,0.0f0,0.0f0,0.0f0)
  overdraw          false
  rotations         Billboard()
  shininess         32.0f0
  specular          Float32[0.2, 0.2, 0.2]
  ssao              false
  strokecolor       :black
  strokewidth       1.0
  transform_marker  false
  transparency      false
  uv_offset_width   Float32[0.0, 0.0, 0.0, 0.0]
  visible           true
source

Examples

using CairoMakie

f = Figure(resolution = (800, 600))
Axis(f[1, 1])

xs = LinRange(0, 10, 20)
ys = 0.5 .* sin.(xs)

scatter!(xs, ys, color = :red)
scatter!(xs, ys .- 1, color = xs)
scatter!(xs, ys .- 2, markersize = LinRange(5, 30, 20))
scatter!(xs, ys .- 3, marker = 'a':'t', strokewidth = 0, color = :black)

f