[Docs] Ideas for additions to docs #4187
Replies: 27 comments
-
Volume plot of 3d function using AbstractPlotting
AbstractPlotting.__init__();
xs = LinRange(-3, 3, 100);
ys = copy(xs);
zs = copy(xs);
ρ(x, y, z) = exp(-(abs(x)))
qs = [ρ(x, y , z) for x in xs, y in ys, z in zs];
sc = Scene(backgroundcolor = :black)
volume!(sc, xs, ys, zs, qs, algorithm = :mip) |
Beta Was this translation helpful? Give feedback.
-
this might be cool to show off the abilities of the plotter: https://github.com/astronexus/HYG-Database It's a dataset of stars with position, color and magnitude (as well as a host of other things). Maybe we could replace the |
Beta Was this translation helpful? Give feedback.
-
From the documentation of
using Makie, ColorSchemes
N = 20
x = LinRange(-0.3, 1, N)
y = LinRange(-1, 0.5, N)
z = x .* y'
image(x, y, z, colormap = ColorSchemes.picasso.colors)
using Makie, ColorSchemes
h = 0.0
offset = 0.1
scene = Scene()
cam2d!(scene)
plot = map(collect(keys(colorschemes))) do cmap
global h
c = to_colormap(colorschemes[cmap].colors)
cbar = image!(
scene,
range(0, stop = 10, length = length(c)),
range(0, stop = 1, length = length(c)),
reshape(c, (length(c), 1)),
show_axis = false
)[end]
text!(
scene,
string(cmap, ":"),
position = Point2f0(-0.1, 0.5 + h),
align = (:right, :center),
show_axis = false,
textsize = 0.4
)
translate!(cbar, 0, h, 0)
h -= (1 + offset)
end
scene |
Beta Was this translation helpful? Give feedback.
-
To document what a const minimal_default = Attributes(
palette = default_palettes,
font = "Dejavu Sans", # font, can be any in system
backgroundcolor = :white, # color of background
color = :black, ## color of what?
colormap = :viridis, # colormap, replicate docs from `Axis`
marker = Circle, ## what is allowed, what does this do?
markersize = 0.1, # size of marker
linestyle = nothing, # in [nothing, :dash, :dot, :dashdot, :dashdotdot], or?
resolution = reasonable_resolution(), # tuple of resolution, Int, auto determined
visible = true, ## what?
clear = true, ## what?
show_axis = true, # show axes or not
show_legend = false, ## what? can we manipulate legend?
scale_plot = true, ## to what?
center = true, ## what else?
axis = Attributes(), ## link to description
axis2d = Attributes(), ## link to description
axis3d = Attributes(), ## link to description
legend = Attributes(), ## what?
axis_type = automatic, ## 2d or 3d I guess?
camera = automatic, ## what else can it be? `campixel!`?
limits = automatic, # link to HyperRectangle docs
padding = Vec3f0(0.1), ## pads all around?
raw = false ## what does it do?
) (everything with double hashtags needs explanation on what it does, everything with single comments we either have or can link to) |
Beta Was this translation helpful? Give feedback.
-
Speaking of publication quality plots, https://github.com/peterkovesi/PerceptualColourMaps.jl seems good. It would be interesting to see whether it can be made compatible with |
Beta Was this translation helpful? Give feedback.
-
Documentation on recipes from Plot Recipes in
|
Beta Was this translation helpful? Give feedback.
-
It'd be obvious to depend on ColorSchemes imho. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for getting this started!
I actually started with that dataset - but took it out when putting it into the gallery :D |
Beta Was this translation helpful? Give feedback.
-
PerceptualColorMaps already works just fine:
|
Beta Was this translation helpful? Give feedback.
-
I see the issue now...maybe we could just generate random data with random RGBA values and glows? That might look too much like noise, though - maybe we could weight it a bit. |
Beta Was this translation helpful? Give feedback.
-
Here's an idea: why not try to replicate some of the |
Beta Was this translation helpful? Give feedback.
-
Not sure if this is the right place for it but I have some silly little toy programs that might serve as useful beginner examples. E.g.: https://github.com/pbouffard/miniature-garbanzo/blob/master/robot.jl which looks like this: https://giphy.com/gifs/25JgIK6v56kKIi7CsG. Probably I have a bunch of rookie Julia mistakes in there. If you think it's useful as a demo then hopefully the PR will help me learn what those are! ;) |
Beta Was this translation helpful? Give feedback.
-
@pbouffard that is pretty awesome :) |
Beta Was this translation helpful? Give feedback.
-
The other one currently in that repo (earthmoon.jl) looks like this: https://giphy.com/gifs/348zy5r9Mnd34KEiro |
Beta Was this translation helpful? Give feedback.
-
@pbouffard you should make a PR to MakieGallery! If you take a look at @block PatrickBouffard ["3d"] begin
@cell "Robot" [interaction, 3d, lines, slider] begin
... # put your code here
end
end |
Beta Was this translation helpful? Give feedback.
-
Can you update any attribute of a plot's |
Beta Was this translation helpful? Give feedback.
-
what do you mean by theme? Just any attribute of a particular plot? If yes, yeah should be... but some attributes sadly don't update right now with GLMakie (e.g. if they change the underlying opengl shader)... Should invest some time at some point to make it consistent, even if it's inefficient |
Beta Was this translation helpful? Give feedback.
-
Do you have a list of which ones don't work? |
Beta Was this translation helpful? Give feedback.
-
attributes: shading, linestyle |
Beta Was this translation helpful? Give feedback.
-
Perfect, that should get integrated into the |
Beta Was this translation helpful? Give feedback.
-
@piever, could you give us a list of all the capabilities that StatsMakie has now? I'm not sure which ones are production ready or not. I'd like to flesh out the StatsMakie examples a bit more, with examples of box plots, OHLC, KDE et cetera like what Simon did in MakieThemes' example. |
Beta Was this translation helpful? Give feedback.
-
That'd be great! StatsMakie is definitely under-documented! The tutorial includes the "grouping and data" aspect, then there are In terms of
You would basically write In terms of "quality":
Everything else should work well. Feel free to ping me if you open a documentation PR, I'd be happy to help! |
Beta Was this translation helpful? Give feedback.
-
From Slack, thanks to @briochemc:
He was on the old docs, but this does bring up valid points about rotations and such. The 'gallery of images' thing we already have 😄 but there are still, of course, improvements to be made. |
Beta Was this translation helpful? Give feedback.
-
On the |
Beta Was this translation helpful? Give feedback.
-
Another Idea for addition to docs: I could never find a description for Point2f0() and Point3f0(). Scatter seems not the work with the latter... I don't really know how to use them (how are they understood by the plotting functions?) even though examples are full of them. |
Beta Was this translation helpful? Give feedback.
-
That must be a bug or wrong usage... Can you post a minimal example? |
Beta Was this translation helpful? Give feedback.
-
How to move plots between scenesLet us assume you have located a plot, let's call this Note that you should not do |
Beta Was this translation helpful? Give feedback.
-
Major topics:
Scene
kwargs - resolution, background colour, etc.Scene
kwargs)update*!
functions as well as changing Themes and updating Axis)ColorSchemes.jl
andPerceptualColorSchemes.jl
in Makie (solved by Update color information JuliaPlots/MakieGallery.jl#11)Minor stuff:
Examples:
Please put more in the comments!
Beta Was this translation helpful? Give feedback.
All reactions