Skip to content

Commit a228abf

Browse files
author
“mahdis-z”
committed
move symbols to scattermapbox
1 parent 7fe5942 commit a228abf

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Set Marker Symbols
3+
plot_url: https://codepen.io/plotly/embed/PoYjYMy/?height=510&theme-id=15263&default-tab=result
4+
language: plotly_js
5+
suite: scattermapbox
6+
order: 5
7+
sitemap: false
8+
arrangement: horizontal
9+
markdown_content: |
10+
This example uses [symbol attribute](https://plot.ly/javascript/reference/#scattermapbox-marker-symbol) to set the marker symbol.
11+
---
12+
var data = [
13+
{
14+
type: "scattermapbox",
15+
mode: "markers+text+lines",
16+
lon: [-75, -80, -50],
17+
lat: [45, 20, -20],
18+
marker: { size: 20, symbol: ["bus", "harbor", "airport"] },
19+
text: ["Bus", "Harbor", "Airport"],
20+
textposition: "bottom right"
21+
}
22+
];
23+
24+
var layout = {
25+
mapbox: { style: "outdoors", zoom: 0.7 },
26+
showlegend: false, height: 500, width: 700
27+
};
28+
29+
var config = {mapboxAccessToken: "add-your-token-here"};
30+
31+
Plotly.newPlot("gd", data, layout, config);

0 commit comments

Comments
 (0)