This example is taken from Vega's gallery
The following is the Ruby code that generates bar.json.
require 'plotrb'
data = pdata.name('table').values(
[
{x: 1, y: 28}, {x: 2, y: 55},
This example is taken from Vega's gallery
The following is the Ruby code that generates bar.json.
require 'plotrb'
data = pdata.name('table').values(
[
{x: 1, y: 28}, {x: 2, y: 55},
This example is taken from Vega's gallery
The following is the Ruby code that generates arc.json.
require 'plotrb'
data = pdata.name('table').values([12,23,47,6,52,19]).transform(pie_transform)
scale = sqrt_scale.name('r').from(data).to([20,100])
This example is taken from Vega's gallery
The following is the Ruby code that generates area.json.
require 'plotrb'
data = pdata.name('table').values(
[
{x: 1, y: 28}, {x: 2, y: 55},
This example is taken from Vega's gallery
The following is the Ruby code that generates lifelines.json.
require 'plotrb'
people = pdata.name('people').url('people.json')
events = pdata.name('events').url('events.json') do
This example is taken from Vega's gallery
The following is the Ruby code that generates barley.json.
require 'plotrb'
raw_data = pdata.name('barley').url('barley_data.json')
variety = pdata.name('variety').source('barley').transform [
facet_transform.keys('variety'),
This example is taken from Vega's gallery
The following is the Ruby code that generates choropleth.json.
require 'plotrb.rb'
ump_data = pdata.name('unemp') do
url('/zuhao/raw/6666293/unemployment.tsv')
id rate | |
1001 .097 | |
1003 .091 | |
1005 .134 | |
1007 .121 | |
1009 .099 | |
1011 .164 | |
1013 .167 | |
1015 .108 | |
1017 .186 |