{"id":21236261,"url":"https://github.com/lepisma/plotly-cl","last_synced_at":"2026-01-02T09:07:17.654Z","repository":{"id":74309062,"uuid":"124596328","full_name":"lepisma/plotly-cl","owner":"lepisma","description":"Common Lisp to plotly.js","archived":false,"fork":false,"pushed_at":"2018-03-20T04:28:36.000Z","size":54,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-21T18:49:27.666Z","etag":null,"topics":["common-lisp","plotlyjs"],"latest_commit_sha":null,"homepage":"","language":"Common Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lepisma.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-09T21:41:08.000Z","updated_at":"2023-07-21T21:56:35.000Z","dependencies_parsed_at":"2023-03-11T17:03:14.874Z","dependency_job_id":null,"html_url":"https://github.com/lepisma/plotly-cl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lepisma%2Fplotly-cl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lepisma%2Fplotly-cl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lepisma%2Fplotly-cl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lepisma%2Fplotly-cl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lepisma","download_url":"https://codeload.github.com/lepisma/plotly-cl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243676777,"owners_count":20329434,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["common-lisp","plotlyjs"],"created_at":"2024-11-21T00:08:41.015Z","updated_at":"2026-01-02T09:07:17.608Z","avatar_url":"https://github.com/lepisma.png","language":"Common Lisp","readme":"#+TITLE: plotly-cl\n\nPlot stuff using ~plotly.js~ in Common Lisp.\n\nWe will reproduce the following chart from [[https://plot.ly/javascript/line-and-scatter/#data-labels-on-the-plot][here]].\n\n[[file:./plot.png]]\n\nJavaScript code is copied below. Lisp code follows.\n\n#+BEGIN_SRC js\n  var trace1 = {\n    x: [1, 2, 3, 4, 5],\n    y: [1, 6, 3, 6, 1],\n    mode: 'markers+text',\n    type: 'scatter',\n    name: 'Team A',\n    text: ['A-1', 'A-2', 'A-3', 'A-4', 'A-5'],\n    textposition: 'top center',\n    textfont: {\n      family:  'Raleway, sans-serif'\n    },\n    marker: { size: 12 }\n  };\n\n  var trace2 = {\n    x: [1.5, 2.5, 3.5, 4.5, 5.5],\n    y: [4, 1, 7, 1, 4],\n    mode: 'markers+text',\n    type: 'scatter',\n    name: 'Team B',\n    text: ['B-a', 'B-b', 'B-c', 'B-d', 'B-e'],\n    textfont : {\n      family:'Times New Roman'\n    },\n    textposition: 'bottom center',\n    marker: { size: 12 }\n  };\n\n  var data = [ trace1, trace2 ];\n\n  var layout = {\n    xaxis: {\n      range: [ 0.75, 5.25 ]\n    },\n    yaxis: {\n      range: [0, 8]\n    },\n    legend: {\n      y: 0.5,\n      yref: 'paper',\n      font: {\n        family: 'Arial, sans-serif',\n        size: 20,\n        color: 'grey',\n      }\n    },\n    title:'Data Labels on the Plot'\n  };\n\n  Plotly.newPlot('myDiv', data, layout);\n#+END_SRC\n\n#+BEGIN_SRC common-lisp\n  (in-package :plotly-cl)\n\n  (let ((trace-1 `((:x . #(1 2 3 4 5))\n                   (:y . #(1 6 3 5 1))\n                   (:mode . \"markers+text\")\n                   (:type . \"scatter\")\n                   (:name . \"Team A\")\n                   (:text . (\"A-1\" \"A-2\" \"A-3\" \"A-4\" \"A-5\"))\n                   (:textposition . \"top center\")\n                   (:textfont . ((:family . \"Raleway, sans-serif\")))\n                   (:marker . ((:size . 12)))))\n        (trace-2 `((:x . #(1.5 2.5 3.5 4.5 5.5))\n                   (:y . #(4 1 7 1 4))\n                   (:mode . \"markers+text\")\n                   (:type . \"scatter\")\n                   (:name . \"Team B\")\n                   (:text . (\"B-a\" \"B-b\" \"B-c\" \"B-d\" \"B-e\"))\n                   (:textposition . \"bottom center\")\n                   (:textfont . ((:family . \"Times New Roman\")))\n                   (:marker . ((:size . 12)))))\n        (layout `((:xaxis . ((:range . (0.75 5.25))))\n                  (:yaxis . ((:range . (0 8))))\n                  (:legend . ((:y . 0.5)\n                              (:yref . \"paper\")\n                              (:font . ((:family . \"Arial, sans-serif\")\n                                        (:size . 20)\n                                        (:color . \"grey\")))))\n                  (:title . \"Data Labels on the Plot\"))))\n    (pl-plot (list trace-1 trace-2) :layout layout :width 1000 :height 500))\n#+END_SRC\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flepisma%2Fplotly-cl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flepisma%2Fplotly-cl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flepisma%2Fplotly-cl/lists"}