# Use WGLMakie from Genie

**URL:** <https://discourse.julialang.org/t/use-wglmakie-from-genie/60985>\
**Category:** Web Stack\
**Tags:** genie, makie, wglmakie\
**Created:** [May 11, 2021, 10:52pm UTC](https://discourse.julialang.org/t/use-wglmakie-from-genie/60985 "2021-05-11T22:52:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [May 11, 2021, 10:52pm UTC](https://discourse.julialang.org/t/use-wglmakie-from-genie/60985/1 "2021-05-11T22:52:50Z")

</div>

[Genie](https://genieframework.github.io/Genie.jl/dev/) is a web framework and [WGLMakie](http://juliaplots.org/WGLMakie.jl/stable/) makes web-interactive graphics, normally by using JSServe.jl.

Is it possible to use WGLMakie in a Genie site? How would you suggest doing it?

* * *

cc @essenciary @sdanisch

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [May 12, 2021, 12:36pm UTC](https://discourse.julialang.org/t/use-wglmakie-from-genie/60985/2 "2021-05-12T12:36:37Z")

</div>

Maybe @piever or @yakir12 have some examples handy…  
I need to give WGLMakie another overhaul soon, to improve docs etc…  
But in principle, using `show(io, MIME"text/html"(), Page()); show(io, MIME"text/html"(), plot);` (page is documented in the docs) should do mostly what you need…

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [May 12, 2021, 12:43pm UTC](https://discourse.julialang.org/t/use-wglmakie-from-genie/60985/3 "2021-05-12T12:43:43Z")

</div>

I never attempted that, I only kept to either WGLMakie with JSServe OR Genie with all sorts of Quasar and Vue things.

But it sure would be cool to allow for that. I would find the combination of both to be amazing (Genie is ultra stable and reliable, WGLMakie can do almost all the plotting anyone would need).

---

<div class="post-metadata">

**Author:** ![AlexisRenchon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alexisrenchon/32/13328_2.png) [@AlexisRenchon](https://discourse.julialang.org/u/AlexisRenchon)\
**Post date:** [January 18, 2023, 5:51pm UTC](https://discourse.julialang.org/t/use-wglmakie-from-genie/60985/4 "2023-01-18T17:51:40Z")

</div>

Any update on this?  
I’d live to see an example

---

<div class="post-metadata">

**Author:** ![ndortega](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ndortega/32/37018_2.png) [@ndortega](https://discourse.julialang.org/u/ndortega)\
**Post date:** [March 8, 2024, 5:04am UTC](https://discourse.julialang.org/t/use-wglmakie-from-genie/60985/5 "2024-03-08T05:04:05Z")

</div>

I don’t mean to highjack this thread to shill my own package, but it’s been a while since anyone has responded. I’ve released some simple plotting support for WGLMakie.jl, CairoMakie.jl, and Bonito.jl in [Oxygen.jl - Plotting Support](https://github.com/OxygenFramework/Oxygen.jl/tree/v1.5.2?tab=readme-ov-file#plotting-support). There’s some simple examples in the Readme.md file for each package.

It ended up being pretty straightforward to get these extensions working with Makie and Bonito. They all use the same show() function which made it easy to load and convert the types. After going through this, I’m fairly positive these kind of changes can be ported over to Genie.jl.

Granted, what I have is much more basic - this provides a way to return either a graph or Bonito app directly from a request handler. I imagine injecting Makie support into Genie’s custom templating engine would be a much more involved effort.
