-
Notifications
You must be signed in to change notification settings - Fork 1
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
Including Plotlyjs plots #259
Comments
That's great :-) So just please don't open a PR with this because long story short, it's very tricky to maintain docs for all the plotting libs in Julia since each of them has their own requirements / dependencies and it makes the docs ever more complex. The hope is to move from that to each plotting library gets a single tutorial page (exactly like the one you just so kindly wrote) which is deployed by itself, and the main docs just points to these tutorial pages :-) I had that a while back, among other things to compare effective TTFX at deployment time, but I lost that work (not very hard to bring back and your tutorial is a good reminder to do it!) once that's in place you can PR this to it 🙏 |
this is all CSS I believe changing the |
Editing the html in the /* on wide screens, fix content width to a max value */
@media (min-width: 940px) {
.franklin-content {
width: 900px; /* original was 705px*/
margin-left: auto;
margin-right: auto; }
} Thanks for the tip, I was putting off this so long and now it looks just like I wanted :D |
Back to my favourite topic: how to include Plotly plots. I've worked out the details, but wanted to open an issue for discussion before opening a PR to document it fully.
The following steps are required:
head.html
, create and fillhead_plotly.html
hasplotly
value toconfig.md
lx_plotlyfig()
function to ˙utils.jl˙hasplotly=true
, save the resulted plot as json, use the\plotlyfig
command)Let me know what you think of this guide!
Edit: one thing would be great, making the plots themselves larger. But I don't know how to achieve that.
Guide itself:
Editing the head htmls
Add this line to your
_layout/head.html
file:Create the
_layout/head_plotly.html
file:I suggest using the lib served by CDN, because then one must not replicate it in their git repo (but can be added if one wants to).
config.md
Add a line to your
config.md
file, that sets the default value forhasplotly
. If you will have only a few pages, where plotly plots will be, then it is suggested to set it tofalse
.utils.jl
Add the following function to your
utils.jl
file. It will define the\plotlyfig{...}
command, that we can use in our markdown source.Edit the desired page
Follow this example and note the followings:
hasplotly=true
.json
extension when calling\plotlyfig{...}
And example page looks like this:
The text was updated successfully, but these errors were encountered: