Skip to content

Instantly share code, notes, and snippets.

@awb99
Created April 22, 2021 16:24
Show Gist options
  • Save awb99/d229a390c318f62ce4ebb94bc9536cc5 to your computer and use it in GitHub Desktop.
Save awb99/d229a390c318f62ce4ebb94bc9536cc5 to your computer and use it in GitHub Desktop.
;; gorilla-repl.fileformat = 2
;; @@ [meta]
{}
;; @@
;; **
;;; # Pink Gorilla
;;;
;;; Shift + enter evaluates code. Hit CTRL+g twice in quick succession or click the menu icon (upper-right corner) for more commands.
;;;
;;; It's a good habit to run each worksheet in its own namespace. We created a random namespace for you; you can keep using it.
;; **
;; @@ [clj]
; Automatically Download Dependencies (if they are not installed already)
(use '[pinkgorilla.notebook.repl])
(pinkgorilla.notebook.repl/add-dependencies '[org.pinkgorilla/gorilla-plot "0.9.3"])
;; @@
;; @@ [clj]
; Define Namespace for your notebook and require namespaces
(ns homeless-pine
(:require
[pinkgorilla.ui.gorilla-plot.core :refer [list-plot bar-chart compose histogram plot]]
))
;; @@
;; @@ [clj]
^:R
[:<>
[:h4 "Hello, World!"]
[:div {:style {:display :flex :flex-direction :row
:color :green :font-weight :bold :background-color :pink
:margin-left 20 :padding 10 :border :solid :width 500}}
[:ol
[:li "The Pinkie"]
[:li "The Pinkie and the Brain"]
[:li "What will we be doing today?"]]
[:img {:height 100 :width 100
:src "https://images-na.ssl-images-amazon.com/images/I/61LeuO%2Bj0xL._SL1500_.jpg"}]]]
;; @@
;; @@ [clj]
^:R [:p/vega "https://raw.githubusercontent.com/vega/vega/master/docs/examples/bar-chart.vg.json" ]
;; @@
;; @@ [clj]
(list-plot (concat (range 10) (reverse (range 10))))
;; @@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment