-
-
Notifications
You must be signed in to change notification settings - Fork 547
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from plotly/bar_charts_with_different_examples_…
…13388529493274 bar marker array example
- Loading branch information
Showing
26 changed files
with
1,040 additions
and
654 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Plotly | ||
|
||
{% if not username %}# Fill in with your personal username and API key | ||
# or, use this public demo account | ||
{% endif %}Plotly.signin({% if username %}"{{username}}"{% else %}"Julia-Demo-Account"{% endif %}, {% if api_key %}"{{api_key}}"{% else %}"hvkrsbg3uj"{% endif %}) | ||
|
||
data = [ | ||
[ | ||
"x" => [1, 2, 3, 4], | ||
"y" => [5, 4, -3, 2], | ||
"marker" => ["color" => ["#447adb", "#447adb", "#db5a44", "#447adb"]], | ||
"type" => "bar" | ||
] | ||
] | ||
|
||
response = Plotly.plot([data], ["filename" => "bar-marker-array", "fileopt" => "overwrite"]) | ||
plot_url = response["url"] |
14 changes: 14 additions & 0 deletions
14
auto-docs/chart-types/bar/bar-marker-array/matlab/code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% if not username %}% Fill in with your personal username and API key | ||
% or, use this public demo account | ||
{% endif %}signin({% if username %}'{{username}}'{% else %}'MATLAB-Demo-Account'{% endif %}, {% if api_key %}'{{api_key}}'{% else %}'p42phiifti'{% endif %}) | ||
|
||
data = {... | ||
struct(... | ||
'x', [1, 2, 3, 4], ... | ||
'y', [5, 4, -3, 2], ... | ||
'marker', struct('color', { {'#447adb', '#447adb', '#db5a44', '#447adb'} }), ... | ||
'type', 'bar')... | ||
}; | ||
|
||
response = plotly(data, struct('filename', 'bar-marker-array', 'fileopt', 'overwrite')); | ||
plot_url = response.url |
17 changes: 17 additions & 0 deletions
17
auto-docs/chart-types/bar/bar-marker-array/nodejs/code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% if not username %}// Fill in with your personal username and API key | ||
// or, use this public demo account | ||
{% endif %}var plotly = require('plotly')({% if username %}'{{username}}'{% else %}'Node.js-Demo-Account'{% endif %},{% if api_key %}'{{api_key}}'{% else %}'dvlqkmw0zm'{% endif %}); | ||
|
||
var data = [ | ||
{ | ||
x: [1, 2, 3, 4], | ||
y: [5, 4, -3, 2], | ||
marker: {color: ["#447adb", "#447adb", "#db5a44", "#447adb"]}, | ||
type: "bar" | ||
} | ||
]; | ||
|
||
var graph_options = {filename: "bar-marker-array", fileopt: "overwrite"} | ||
plotly.plot(data, graph_options, function (err, msg) { | ||
console.log(msg); | ||
}); |
18 changes: 18 additions & 0 deletions
18
auto-docs/chart-types/bar/bar-marker-array/python/code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import plotly.plotly as py | ||
from plotly.graph_objs import * | ||
|
||
{% if not username %}# Fill in with your personal username and API key | ||
# or, use this public demo account | ||
{% endif %}py.sign_in({% if username %}"{{username}}"{% else %}'Python-Demo-Account'{% endif %}, {% if api_key %}"{{api_key}}"{% else %}'gwt101uhh0'{% endif %}) | ||
|
||
data = Data([ | ||
Bar( | ||
x=[1, 2, 3, 4], | ||
y=[5, 4, -3, 2], | ||
marker=Marker( | ||
color=['#447adb', '#447adb', '#db5a44', '#447adb'] | ||
) | ||
) | ||
]) | ||
|
||
plot_url = py.plot(data, filename='bar-marker-array') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
library(plotly) | ||
|
||
{% if not username %}# Fill in with your personal username and API key | ||
# or, use this public demo account | ||
{% endif %}p <- plotly(username={% if username %}"{{username}}"{% else %}'R-Demo-Account'{% endif %}, key={% if api_key %}"{{api_key}}"{% else %}'yu680v5eii'{% endif %}) | ||
|
||
data <- list( | ||
list( | ||
x = c(1, 2, 3, 4), | ||
y = c(5, 4, -3, 2), | ||
marker = list(color = c("#447adb", "#447adb", "#db5a44", "#447adb")), | ||
type = "bar" | ||
) | ||
) | ||
|
||
response <- p$plotly(data, kwargs=list(filename="bar-marker-array", fileopt="overwrite")) | ||
url <- response$url | ||
filename <- response$filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using Plotly | ||
|
||
using Plotly | ||
Plotly.signin("TestBot", "r1neazxo9w") | ||
|
||
data = [ | ||
[ | ||
"x" => [1, 2, 3, 4], | ||
"y" => [5, 4, -3, 2], | ||
"marker" => ["color" => ["#447adb", "#447adb", "#db5a44", "#447adb"]], | ||
"type" => "bar" | ||
] | ||
] | ||
|
||
response = Plotly.plot([data], ["filename" => "bar-marker-array", "fileopt" => "overwrite", "auto_open" => "false"]) | ||
plot_url = response["url"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
signin('TestBot', 'r1neazxo9w') | ||
|
||
data = {... | ||
struct(... | ||
'x', [1, 2, 3, 4], ... | ||
'y', [5, 4, -3, 2], ... | ||
'marker', struct('color', { {'#447adb', '#447adb', '#db5a44', '#447adb'} }), ... | ||
'type', 'bar')... | ||
}; | ||
|
||
response = plotly(data, struct('filename', 'bar-marker-array', 'fileopt', 'overwrite', 'auto_open', 'false')); | ||
plot_url = response.url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var plotly = require('plotly')('TestBot', 'r1neazxo9w') | ||
|
||
var data = [ | ||
{ | ||
x: [1, 2, 3, 4], | ||
y: [5, 4, -3, 2], | ||
marker: {color: ["#447adb", "#447adb", "#db5a44", "#447adb"]}, | ||
type: "bar" | ||
} | ||
]; | ||
|
||
var graph_options = {filename: "bar-marker-array", fileopt: "overwrite", auto_open: "false"} | ||
plotly.plot(data, graph_options, function (err, msg) { | ||
console.log(msg); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import plotly.plotly as py | ||
from plotly.graph_objs import * | ||
|
||
py.sign_in('TestBot', 'r1neazxo9w') | ||
|
||
data = Data([ | ||
Bar( | ||
x=[1, 2, 3, 4], | ||
y=[5, 4, -3, 2], | ||
marker=Marker( | ||
color=['#447adb', '#447adb', '#db5a44', '#447adb'] | ||
) | ||
) | ||
]) | ||
|
||
plot_url = py.plot(data, filename='bar-marker-array', auto_open=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
library(plotly) | ||
|
||
p <- plotly(username='TestBot', key='r1neazxo9w') | ||
|
||
data <- list( | ||
list( | ||
x = c(1, 2, 3, 4), | ||
y = c(5, 4, -3, 2), | ||
marker = list(color = c("#447adb", "#447adb", "#db5a44", "#447adb")), | ||
type = "bar" | ||
) | ||
) | ||
|
||
response <- p$plotly(data, kwargs=list(filename="bar-marker-array", fileopt="overwrite", auto_open="FALSE")) | ||
url <- response$url | ||
filename <- response$filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"languages": [ | ||
"python", | ||
"nodejs", | ||
"r", | ||
"matlab", | ||
"julia" | ||
], | ||
"name": "Customizing Individual Bar Colors" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"x": [ | ||
1, | ||
2, | ||
3, | ||
4 | ||
], | ||
"y": [ | ||
5, | ||
4, | ||
-3, | ||
2 | ||
], | ||
"marker": { | ||
"color": [ | ||
"#447adb", | ||
"#447adb", | ||
"#db5a44", | ||
"#447adb" | ||
] | ||
}, | ||
"type": "bar" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
published/api-docs/chart-types/bar/bar-marker-array/julia/code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Plotly | ||
|
||
{% if not username %}# Fill in with your personal username and API key | ||
# or, use this public demo account | ||
{% endif %}Plotly.signin({% if username %}"{{username}}"{% else %}"Julia-Demo-Account"{% endif %}, {% if api_key %}"{{api_key}}"{% else %}"hvkrsbg3uj"{% endif %}) | ||
|
||
data = [ | ||
[ | ||
"x" => [1, 2, 3, 4], | ||
"y" => [5, 4, -3, 2], | ||
"marker" => ["color" => ["#447adb", "#447adb", "#db5a44", "#447adb"]], | ||
"type" => "bar" | ||
] | ||
] | ||
|
||
response = Plotly.plot([data], ["filename" => "bar-marker-array", "fileopt" => "overwrite"]) | ||
plot_url = response["url"] |
14 changes: 14 additions & 0 deletions
14
published/api-docs/chart-types/bar/bar-marker-array/matlab/code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% if not username %}% Fill in with your personal username and API key | ||
% or, use this public demo account | ||
{% endif %}signin({% if username %}'{{username}}'{% else %}'MATLAB-Demo-Account'{% endif %}, {% if api_key %}'{{api_key}}'{% else %}'p42phiifti'{% endif %}) | ||
|
||
data = {... | ||
struct(... | ||
'x', [1, 2, 3, 4], ... | ||
'y', [5, 4, -3, 2], ... | ||
'marker', struct('color', { {'#447adb', '#447adb', '#db5a44', '#447adb'} }), ... | ||
'type', 'bar')... | ||
}; | ||
|
||
response = plotly(data, struct('filename', 'bar-marker-array', 'fileopt', 'overwrite')); | ||
plot_url = response.url |
17 changes: 17 additions & 0 deletions
17
published/api-docs/chart-types/bar/bar-marker-array/nodejs/code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% if not username %}// Fill in with your personal username and API key | ||
// or, use this public demo account | ||
{% endif %}var plotly = require('plotly')({% if username %}'{{username}}'{% else %}'Node.js-Demo-Account'{% endif %},{% if api_key %}'{{api_key}}'{% else %}'dvlqkmw0zm'{% endif %}); | ||
|
||
var data = [ | ||
{ | ||
x: [1, 2, 3, 4], | ||
y: [5, 4, -3, 2], | ||
marker: {color: ["#447adb", "#447adb", "#db5a44", "#447adb"]}, | ||
type: "bar" | ||
} | ||
]; | ||
|
||
var graph_options = {filename: "bar-marker-array", fileopt: "overwrite"} | ||
plotly.plot(data, graph_options, function (err, msg) { | ||
console.log(msg); | ||
}); |
18 changes: 18 additions & 0 deletions
18
published/api-docs/chart-types/bar/bar-marker-array/python/code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import plotly.plotly as py | ||
from plotly.graph_objs import * | ||
|
||
{% if not username %}# Fill in with your personal username and API key | ||
# or, use this public demo account | ||
{% endif %}py.sign_in({% if username %}"{{username}}"{% else %}'Python-Demo-Account'{% endif %}, {% if api_key %}"{{api_key}}"{% else %}'gwt101uhh0'{% endif %}) | ||
|
||
data = Data([ | ||
Bar( | ||
x=[1, 2, 3, 4], | ||
y=[5, 4, -3, 2], | ||
marker=Marker( | ||
color=['#447adb', '#447adb', '#db5a44', '#447adb'] | ||
) | ||
) | ||
]) | ||
|
||
plot_url = py.plot(data, filename='bar-marker-array') |
18 changes: 18 additions & 0 deletions
18
published/api-docs/chart-types/bar/bar-marker-array/r/code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
library(plotly) | ||
|
||
{% if not username %}# Fill in with your personal username and API key | ||
# or, use this public demo account | ||
{% endif %}p <- plotly(username={% if username %}"{{username}}"{% else %}'R-Demo-Account'{% endif %}, key={% if api_key %}"{{api_key}}"{% else %}'yu680v5eii'{% endif %}) | ||
|
||
data <- list( | ||
list( | ||
x = c(1, 2, 3, 4), | ||
y = c(5, 4, -3, 2), | ||
marker = list(color = c("#447adb", "#447adb", "#db5a44", "#447adb")), | ||
type = "bar" | ||
) | ||
) | ||
|
||
response <- p$plotly(data, kwargs=list(filename="bar-marker-array", fileopt="overwrite")) | ||
url <- response$url | ||
filename <- response$filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.