Finding plotting function attributes, e.g. alpha, for Makie plotting functions

Is there a programmatic way (or better documentation available) to find the available attributes for each plotting function. For example, the arrows function has a nice attribute list in help and at https://makie.juliaplots.org/dev/examples/plotting_functions/arrows/:

However, I cannot find a similar list for scatter in the help documentation or at https://makie.juliaplots.org/dev/examples/plotting_functions/scatter/ and I am now left wondering if my code below is wrong for setting alpha transparency on a scatter plot or if it is not supported.

using CairoMakie

f = Figure()
Axis(f[1, 1])
xs = LinRange(0, 10, 20)
ys = 0.5 .* sin.(xs)
scatter!(xs, ys, color = :red)
scatter!(xs, ys .- 1, color = :red, alpha = 0.1)
f

because as you see here, there is no transparency applied to the lower points:

1 Like

try:

using SomeMakie
help_attributes(your_desired_plotting_function)
2 Likes

Plot object level alpha is currently not supported, you can pass alpha colors with a tuple (color, alpha) though

2 Likes

thanks. this does work:

scatter!(xs, ys .- 1, color = (:red,0.5))

exactly what I needed :slight_smile: . For example:

image

Now, is there a way to go one level deeper. For example, learn what ambient or diffuse is?

3 Likes