MakieOrg / Makie.jl

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

What's missing #490

Closed SimonDanisch closed 4 years ago

SimonDanisch commented 5 years ago

There is actually not that much to do anymore until this is fully functioning:

asinghvi17 commented 5 years ago

Any chance of export to svg? Reading through the Three.js docs they don't seem to support much...

SimonDanisch commented 5 years ago

i wouldtn try to support svg via threejs...

SimonDanisch commented 5 years ago

Layouting, subscenes and all cameras work now: https://nextjournal.com/sdanisch/wglmakie

asinghvi17 commented 5 years ago

When I try it locally nothing is displayed - in Jupyter and Juno.

SimonDanisch commented 5 years ago

did you activate the plot pane?

asinghvi17 commented 5 years ago

Another thing - is there a possibility of a Blink display backend? (For those of us who use the REPL)

SimonDanisch commented 5 years ago

yeah that should just work ;)

asinghvi17 commented 5 years ago

Can’t seem to figure out how to use Blink as a display backend for WGLMakie. I think that it boils down to something like:

using AbstractPlotting, WGLMakie
sc = lines(rand(10))
using Blink
w = Window()

body!(w, show(MIME"text/html", sc))

but that doesn't seem to work.

EDIT: To use Blink, this works:

using Blink
w = Window()
using WebIO
n = node(:div, "hi")
body!(w, n)
using AbstractPlotting, WGLMakie
scene = scatter(rand(4))
body!(w, WGLMakie.three_scene(scene))
Timmmdavis commented 5 years ago

I tried the above: using Blink; w = Window(); using WebIO; n = WebIO.node(:div, "hi"); body!(w, n); using AbstractPlotting, WGLMakie; scene = scatter(rand(4)); body!(w, WGLMakie.three_scene(scene)); I get the following error (on the last line): body!(w, WGLMakie.three_scene(scene)) ERROR: MethodError: no method matching JSModule(::getfield(WGLMakie, Symbol("##9#10")){Int64,Int64}, ::Symbol, ::String) Stacktrace: [1] three_scene(::Scene) at C:\Users\Berlin\.julia\packages\WGLMakie\Ysuil\src\WGLMakie.jl:174 [2] top-level scope at none:0 Do you have any suggested solutions?

SimonDanisch commented 5 years ago

Setup is a bit complicated ATM: https://nextjournal.com/sdanisch/wglmakie

Timmmdavis commented 5 years ago

Great, thanks for the speedy reply, got it working after running the pkg add command from the top line of your next journal (used the default WebIO not WebIO#sd-httpheader): e.g. plotting a mesh:

using Blink, WebIO;  
using AbstractPlotting, WGLMakie, MakieGallery;
w = Window(); 
n = WebIO.node(:div, "hi"); body!(w, n); 
scene=run_example("Colored Mesh");
body!(w, WGLMakie.three_scene(scene));

A long shot but have you tested this with PackageComplier?

SimonDanisch commented 5 years ago

Not yet... The problem is, how to get it to display while snooping... Would need to have some fake display code somewhere.

Timmmdavis commented 5 years ago

Ok, cool, if you get it working it would be good to know.

Tim

piever commented 4 years ago

This feels almost fully functional! Playing with it, I noticed two more features that are missing here but work well in GLMakie:

yijiangh commented 4 years ago

I'm trying the Blink option above , but body!(w, WGLMakie.three_scene(scene)); tells me that WGLMakie.three_scene is undefined. Would you mind pointing me to the latest way to do this? Thanks!

Ouam74 commented 4 years ago

Hi, i have the same problem, i cannot render a Makie plot into Blink using : body!(w, WGLMakie.three_scene(scene)). I get following message : "LoadError: UndefVarError: three_scene not defined"

Could you please help?

Thank you in advance !

schneiderfelipe commented 3 years ago

I'm trying the Blink option above , but body!(w, WGLMakie.three_scene(scene)); tells me that WGLMakie.three_scene is undefined. Would you mind pointing me to the latest way to do this? Thanks!

I am also having this issue:

julia> body!(w, WGLMakie.three_scene(scene))
ERROR: UndefVarError: three_scene not defined
Stacktrace:
 [1] getproperty(::Module, ::Symbol) at ./Base.jl:26
 [2] top-level scope at REPL[103]:1
SimonDanisch commented 3 years ago

This works pretty well by now:

using Blink
s = scatter(1:4)
w = Window()
body!(w, s)

Only problem: the resolution isn't really synced, so it comes out as too big!

yijiangh commented 3 years ago

@SimonDanisch Thanks! Just complementing your code snippet to make it an MWE:

using Blink, AbstractPlotting, WGLMakie
s = scatter(1:4)
w = Window()
body!(w, s)

Package info:

(@v1.5) pkg> st Makie
  [ee78f7c6] Makie v0.11.1

(@v1.5) pkg> st WGLMakie
  [276b4fcb] WGLMakie v0.2.9

(@v1.5) pkg> st Blink
  [ad839575] Blink v0.12.3

(@v1.5) pkg> st AbstractPlotting
  [537997a7] AbstractPlotting v0.12.15