Skip to content

Commit

Permalink
Merge pull request plotly#1247 from plotly/splom_js_dont_reuse_same_a…
Browse files Browse the repository at this point in the history
…xis_object

fix bug in js splom example by not recycling the same object for all axes
  • Loading branch information
michaelbabyn authored Jan 24, 2019
2 parents 17dfd03 + 80b264a commit fcc6cac
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
36 changes: 18 additions & 18 deletions _posts/plotly_js/statistical/splom/2018-05-23-diabetes.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
[1, '#ef553b']
]

axis = {
var axis = () => ({
showline:false,
zeroline:false,
gridcolor:'#ffff',
ticklen:2,
tickfont:{size:10},
titlefont:{size:12}
}
})

var data = [{
type: 'splom',
Expand Down Expand Up @@ -73,22 +73,22 @@
hovermode:'closest',
dragmode:'select',
plot_bgcolor:'rgba(240,240,240, 0.95)',
xaxis:axis,
yaxis:axis,
xaxis2:axis,
xaxis3:axis,
xaxis4:axis,
xaxis5:axis,
xaxis6:axis,
xaxis7:axis,
xaxis8:axis,
yaxis2:axis,
yaxis3:axis,
yaxis4:axis,
yaxis5:axis,
yaxis6:axis,
yaxis7:axis,
yaxis8:axis
xaxis:axis(),
yaxis:axis(),
xaxis2:axis(),
xaxis3:axis(),
xaxis4:axis(),
xaxis5:axis(),
xaxis6:axis(),
xaxis7:axis(),
xaxis8:axis(),
yaxis2:axis(),
yaxis3:axis(),
yaxis4:axis(),
yaxis5:axis(),
yaxis6:axis(),
yaxis7:axis(),
yaxis8:axis()
}

Plotly.react('graph', data, layout);
Expand Down
20 changes: 10 additions & 10 deletions _posts/plotly_js/statistical/splom/2018-05-23-iris.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
[1, '#636efa']
]

axis = {
var axis = () => ({
showline:false,
zeroline:false,
gridcolor:'#ffff',
ticklen:4
}
})

var data = [{
type: 'splom',
Expand Down Expand Up @@ -71,14 +71,14 @@
hovermode:'closest',
dragmode:'select',
plot_bgcolor:'rgba(240,240,240, 0.95)',
xaxis:axis,
yaxis:axis,
xaxis2:axis,
xaxis3:axis,
xaxis4:axis,
yaxis2:axis,
yaxis3:axis,
yaxis4:axis
xaxis:axis(),
yaxis:axis(),
xaxis2:axis(),
xaxis3:axis(),
xaxis4:axis(),
yaxis2:axis(),
yaxis3:axis(),
yaxis4:axis()
}

Plotly.react('graph', data, layout)
Expand Down

0 comments on commit fcc6cac

Please sign in to comment.