{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "#### Plotly Presentations\n", "To use Plotly's Presentations API you will write your presentation code in a string of markdown and then pass that through the Presentations API function `pres.Presentation()`. This creates a JSON version of your presentation. To upload the presentation online pass it through `py.presentation_ops.upload()`.\n", "\n", "In your string, use `---` on a single line to seperate two slides. To put a title in your slide, put a line that starts with any number of `#`s. Only your first title will be appear in your slide. A title looks like:\n", "\n", "`# slide title`\n", "\n", "Anything that comes after the title will be put as text in your slide. Check out the example below to see this in action." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Current Limitations\n", "`Boldface`, _italics_ and [hypertext](https://www.w3.org/WhatIs.html) are not supported features of the Presentation API." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Display in Jupyter\n", "The function below generates HTML code to display the presentation in an iframe directly in Jupyter." ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [], "source": [ "def url_to_iframe(url, text=True):\n", " html = ''\n", " # style\n", " html += '''
\n", " \n", " '\n", " '''\n", " # iframe\n", " html += ''\n", " if text:\n", " html += '''\n", "Click on the presentation above and use left/right arrow keys to flip through the slides.
\n", "Click on the presentation above and use left/right arrow keys to flip through the slides.
\n", "Click on the presentation above and use left/right arrow keys to flip through the slides.
\n", "Click on the presentation above and use left/right arrow keys to flip through the slides.
\n", "Click on the presentation above and use left/right arrow keys to flip through the slides.
\n", "