{"id":19700384,"url":"https://github.com/pablrod/p5-chart-plotly","last_synced_at":"2025-10-30T13:19:22.368Z","repository":{"id":52706233,"uuid":"69108537","full_name":"pablrod/p5-Chart-Plotly","owner":"pablrod","description":"Generate html/javascript charts with perl data using javascript library Plotly.js","archived":false,"fork":false,"pushed_at":"2022-08-15T15:25:53.000Z","size":28089,"stargazers_count":9,"open_issues_count":6,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-05T17:36:05.210Z","etag":null,"topics":["chart","javascript-library-plotly","perl","perl-data","plot"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pablrod.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-24T14:55:07.000Z","updated_at":"2025-03-02T08:17:40.000Z","dependencies_parsed_at":"2022-08-21T19:40:15.919Z","dependency_job_id":null,"html_url":"https://github.com/pablrod/p5-Chart-Plotly","commit_stats":null,"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablrod%2Fp5-Chart-Plotly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablrod%2Fp5-Chart-Plotly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablrod%2Fp5-Chart-Plotly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablrod%2Fp5-Chart-Plotly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pablrod","download_url":"https://codeload.github.com/pablrod/p5-Chart-Plotly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251509667,"owners_count":21600682,"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":["chart","javascript-library-plotly","perl","perl-data","plot"],"created_at":"2024-11-11T21:05:46.773Z","updated_at":"2025-10-30T13:19:22.303Z","avatar_url":"https://github.com/pablrod.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nChart::Plotly - Generate html/javascript charts from perl data using javascript library plotly.js\n\n# VERSION\n\nversion 0.042\n\n# SYNOPSIS\n\n```perl\nuse Chart::Plotly 'show_plot';\n\nmy $data = { x    =\u003e [ 1 .. 10 ],\n             mode =\u003e 'markers',\n             type =\u003e 'scatter'\n};\n$data-\u003e{'y'} = [ map { rand 10 } @{ $data-\u003e{'x'} } ];\n\nshow_plot([$data]);\n\nuse aliased 'Chart::Plotly::Trace::Scattergl';\n\nmy $big_array = [ 1 .. 10000 ];\nmy $scattergl = Scattergl-\u003enew( x =\u003e $big_array, y =\u003e [ map { rand 100 } @$big_array ] );\n\nshow_plot([$scattergl]);\n\nuse Chart::Plotly qw(show_plot);\nuse PDL;\n\nuse aliased 'Chart::Plotly::Trace::Surface';\n\nmy $size = 25;\nmy $x    = ( xvals zeroes $size+ 1, $size + 1 ) / $size;\nmy $y    = ( yvals zeroes $size+ 1, $size + 1 ) / $size;\nmy $z    = 0.5 + 0.5 * ( sin( $x * 6.3 ) * sin( $y * 6.3 ) )**3;    # Bumps\n\nmy $surface = Surface-\u003enew( x =\u003e $x, y =\u003e $y, z =\u003e $z );\n\nshow_plot([$surface]);\n\nuse PDL::Math;\n\nmy $bessel_size = 50;\nmy $bessel      = Surface-\u003enew(\n    x =\u003e xvals($bessel_size),\n    y =\u003e xvals($bessel_size),\n    z =\u003e bessj0( rvals( zeroes( $bessel_size, $bessel_size ) ) / 2 )\n);\n\nshow_plot([$bessel]);\n```\n\n# DESCRIPTION\n\nGenerate html/javascript charts from perl data using javascript library plotly.js. The result\nis a file that you could see in your favourite browser.\n\n[![Build Status](https://travis-ci.org/pablrod/p5-Chart-Plotly.png?branch=master)](https://travis-ci.org/pablrod/p5-Chart-Plotly)\n[![Build status](https://ci.appveyor.com/api/projects/status/wbur95v3sjk4mv6d/branch/master?svg=true)](https://ci.appveyor.com/project/pablrod/p5-chart-plotly/branch/master)\n\nExample screenshot of plot generated with examples/anscombe.pl:\n\n![Anscombe's quartet plotted with plotly](https://raw.githubusercontent.com/pablrod/p5-Chart-Plotly/master/examples/anscombe.png)\n\nExample screenshot of plots generated with examples/traces/\\*.pl:\n\n![Montage of all examples](https://raw.githubusercontent.com/pablrod/p5-Chart-Plotly/master/examples/montage_all_traces.png)\n\nThe API is subject to changes.\n\n# FUNCTIONS\n\n## render\\_full\\_html\n\n### Parameters\n\n- data:\n\n    Data to be represented. It could be:\n\n    - Perl data structure of the json expected by plotly.js: [http://plot.ly/javascript/reference/](http://plot.ly/javascript/reference/) (this data would be serialized to JSON)\n    - Array ref of objects of type Chart::Plotly::Trace::\\*\n    - Anything that could be serialized to JSON with the json expected by plotly.js\n    - Object that could be adapted using Chart::Plotly::Adapter::\\*\n\n## html\\_plot\n\nReturn the html for the plot or plots\n\n### Parameters\n\nData to be represented. The format is the same as the parameter data in render\\_full\\_html. Accepts multiple traces/plots/objects.\n\n## show\\_plot\n\nOpens the plot or plots in a browser locally\n\n### Parameters\n\nData to be represented. The format is the same as the parameter data in render\\_full\\_html. Accepts multiple traces/plots/objects.\n\n## plotlyjs\\_version\n\nReturns the version of plotly.js using in this version of the perl module as a string\n\n## plotlyjs\\_plot\\_function\n\nReturns the name of function of plotly.js used in this version of the perl module to draw plots\n\n## plotlyjs\\_plot\\_function\\_parameters\n\nReturns the function parameters of the function of plotly.js used in this version of the perl module to draw plots as a list of strings\n\n# BUGS\n\nPlease report any bugs or feature requests via github: [https://github.com/pablrod/p5-Chart-Plotly/issues](https://github.com/pablrod/p5-Chart-Plotly/issues)\n\n# DISCLAIMER\n\nThis is an unofficial Plotly Perl module. Currently I'm not affiliated in any way with Plotly. \nBut I think plotly.js is a great library and I want to use it with perl.\n\nIf you like plotly.js please consider supporting them purchasing a pro subscription: [https://plot.ly/products/cloud/](https://plot.ly/products/cloud/)\n\n# AUTHOR\n\nPablo Rodríguez González \u003cpablo.rodriguez.gonzalez@gmail.com\u003e\n\n# COPYRIGHT AND LICENSE\n\nThis software is Copyright (c) 2022 by Pablo Rodríguez González.\n\nThis is free software, licensed under:\n\n```\nThe MIT (X11) License\n```\n\n# CONTRIBUTORS\n\n- Roy Storey \u003ckiwiroy@users.noreply.github.com\u003e\n- stphnlyd \u003cstephanloyd9@gmail.com\u003e\n- weatherwax \u003cs.g.lobo@hotmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablrod%2Fp5-chart-plotly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpablrod%2Fp5-chart-plotly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablrod%2Fp5-chart-plotly/lists"}