-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add suport for evcxr. #208
Comments
I haven't heard of it, but i was intrigued and looked into it. If I just render a plot to a string and get evcxr to render that output as html, it displays the svg. You can see the commands here: https://github.com/tiby312/poloto-project/blob/master/poloto/test-evcxr.ipynb EDIT: not sure why the svg doesnt display with githubs viewer. |
Plotter has support for evcxr, this is the file: https://github.com/plotters-rs/plotters/blob/master/plotters/src/evcxr.rs. |
Does it work with the github viewer though? It seems to have the same problem. The github viewer seems to be removing the style tag. I think it is a sanitizing thing. |
Sorry, I am new to github, I don't know how to run jupyter in github for now. |
These sounds like similar problem: If you push a ipynb file to github and then click on the file, it should display it. |
Rendering Notebooks on GitHub https://blog.jupyter.org/rendering-notebooks-on-github-f7ac8736d686 That article says something about custom css not supported by GitHub for security reason. EDIT: works with nbviewer just not github: |
This link mentions it works if you use the img tag EDIT: nvm still doesnt work with img tag. Github just always removes the style tag. |
Got it to work in github viewer by inlining the css. https://github.com/tiby312/poloto-project/blob/master/poloto-evcxr/example.ipynb |
Good idea I'll do that next |
Unfortunately evcxr_display requires a borrow of self when the Stage4 render functions need to move self. However, I did add a dedicated function that makes it a little more egronomic. https://github.com/tiby312/poloto-project/blob/master/poloto-evcxr/example.ipynb |
I got rid of the inline css. I instead updated poloto to atleast show something even if there is no css. So in github viewer it just shows a rudimentary graph. Then you can view it with css with an external viewer. EDIT: found github/markup#270 |
evcxr is a crate for jupyter, I thought the combination of evcxr and beautiful poloto figure would have great powerful.
The text was updated successfully, but these errors were encountered: