ash1day / rbplotly Goto Github PK
View Code? Open in Web Editor NEWa Ruby visualization library
License: MIT License
a Ruby visualization library
License: MIT License
The developers who want to run all spec files, they need to define PLOTLY_USERNAME
and PLOTLY_API_KEY
environment variables.
But there is no information about hem in README.
rbplotly cannot render charts on JupyterLab even if jupyterlab/plotly-extension is installed.
The following message has been displayed on console:
[E 15:52:34.774 LabApp] Notebook JSON is invalid: Additional properties are not allowed ('source' was unexpected)
Failed validating 'additionalProperties' in display_data:
On instance['cells'][12]['outputs'][0]:
{'data': {'text/html': '\n'
' <script>\n'
" requirejs.config({paths: { 'plotly': "
"['https://cdn...",
'text/plain': '#<Plotly::Offline::HTML:0x00000000041ed710 '
'@id="a674fc2e-6241-48...'},
'metadata': {},
'output_type': 'display_data',
'source': 'ruby'}
Binder turns a GitHub repo into a collection of interactive notebooks.
Binder creates a Jupyter environment for Dockerfile in the repo.
This enables you to run rbplotly examples without installation.
Could you release new version with #to_html
feature?
require 'rbplotly'
x = [0, 1, 2, 3, 4]
trace0 = { x: x, y: [0, 2, 1, 4, 3], type: :scatter, mode: :lines }
trace1 = { x: x, y: [4, 1, 3, 0, 2], type: :scatter, mode: :'markers+lines' }
data = [trace0, trace1] # data must be an array
layout = { width: 500, height: 500 }
plot = Plotly::Plot.new(data: data, layout: layout)
plot.layout.height = 300 # You can assign plot's attributes.
plot.generate_html(path: './line_chart.html')
fails with
Traceback (most recent call last):
5: from hoge.rb:14:in `<main>'
4: from /usr/local/bundle/gems/rbplotly-0.1.2/lib/plotly/offline/exportable.rb:20:in `generate_html'
3: from /usr/local/bundle/gems/launchy-2.4.3/lib/launchy.rb:29:in `open'
2: from /usr/local/bundle/gems/launchy-2.4.3/lib/launchy/applications/browser.rb:78:in `open'
1: from /usr/local/bundle/gems/launchy-2.4.3/lib/launchy/applications/browser.rb:67:in `cmd_and_args'
/usr/local/bundle/gems/launchy-2.4.3/lib/launchy/applications/browser.rb:63:in `browser_cmdline': Unable to find a browser command. If this is unexpected, Please rerun with environment variable LAUNCHY_DEBUG=true or the '-d' commandline option and file a bug at https://github.com/copiousfreetime/launchy/issues/new (Launchy::CommandNotFoundError)
~# ruby -v
ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]
Is it possible to save generated graphs to local directory?
It seems that it is possible to download image when 'online' mode, but I couldn't find how to save graph when 'offline' mode.
How is this library different from nyaplot?
Was there any specific reason for creating a new library and not improving nyaplot instead? It already does a lot of the things that rbplotly is trying to achieve.
Thanks for giving the opportunity to use plotly directly from ruby.
It is so convenient for me to code by Ruby and get lots of information from plot.ly.
BTW, can I use the subplot? and How?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.