-
-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Provide multiple output formats to IJulia #2195
Comments
Cross references:
|
One problem is that for some plots with lots of data points, vector graphics become very large and slow. In those cases bitmaps are desirable, but even though CairoMakie uses png by default, it seems that IJulia still saves an svg for every plot and displays that because it is ranked higher. |
Agreed. Execution time (Intel® Xeon® Silver 4210R CPU @ 2.40GHz) for https://lazarusa.github.io/BeautifulMakie/withTheme/theme_dark_astronauts/ [all packages installed and precompiled]:
ℹ️ JupyterLab is able to display the svg while code-server fails miserably. |
I can't confirm that. You may login at https://demo.jupyter.b-data.ch with your GitHub account, Start image Pkg.add("CairoMakie") IJulia.ijulia_mime_types import CairoMakie
x = range(0, 10, length = 100)
y = sin.(x)
CairoMakie.lines(x, y) in JupyterLab or code-server; whatever you prefer. If you then |
Feel free to open a PR with those changes! I don't think we currently have the resources to work on this! |
The issue is now described in detail and the solution a nice to have. I currently do not have the resources to fix this either. I will see if I can contribute something at a later date. P.S.: Makie is great! |
Looks like you can set |
No, the question is asking for all possible formats to be marked showable/actually shown so Jupyter has access to png, svg and pdf output. |
Currently, only one output format is provided:
png
by default; otherwise what is set by theactivate!
function (e.g.CairoMakie.activate!(type = "svg")
, but only if there is a match with https://github.com/JuliaLang/IJulia.jl/blob/1cdaf7e5e65c1221b4a3fac86f63253bea65a0c5/src/display.jl#L19-L28.Please provide every MIME type specified in the first level of that vector.
👉 After executing
IJulia.register_mime(MIME("application/pdf"))
I would likeMakie.js
(CairoMakie
) to return bothimage/svg+xml
andapplication/pdf
.This allows
IJulia
to useimage/svg+xml
for plot display in the browser+ HTML conversion using SVG
application/pdf
for direct PDF conversionSee JuliaPlots/Plots.jl#4288 about the same feature request for
Plots.jl
.The text was updated successfully, but these errors were encountered: