-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Peter Solymos <psolymos@gmail.com>
- Loading branch information
Showing
337 changed files
with
21,162 additions
and
9,121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"name": "app.py", "content": "import seaborn as sns\nimport matplotlib.pyplot as plt\nfrom shiny import App, render, ui\n\nfaithful = sns.load_dataset(\"geyser\")\nx = faithful.waiting\n\napp_ui = ui.page_fixed(\n ui.panel_title(\"Old Faithful\"),\n ui.output_plot(id = \"histogram\"),\n ui.input_slider(\n id=\"n\", \n label=\"Number of bins:\", \n min=1, \n max=50, \n value=25,\n ticks=True\n ),\n)\n\ndef server(input, output, session):\n @render.plot(alt=\"Histogram of waiting times\")\n def histogram():\n plt.hist(\n x, \n bins = input.n(), \n density=False, \n color=\"#BB74DB\",\n edgecolor=\"white\")\n plt.title(\"Histogram of waiting times\")\n plt.xlabel(\"Waiting time to next eruption [mins]\")\n plt.ylabel(\"Frequency\")\n\napp = App(ui = app_ui, server = server)\n", "type": "text"}, {"name": "requirements.txt", "content": "shiny>=0.10.2\nmatplotlib\nseaborn\n", "type": "text"}] |
Oops, something went wrong.