0
我正在构建遵循其在线示例here的绘图表面。我一直无法找到具有自定义轴标签的3D表面的示例,例如here。我尝试在布局对象上放置一个带有标题的xaxis对象,然后将其作为第三个参数传递给Plotly.newPlot()命令,但没有渲染。使用绘图创建3D表面图形的自定义轴标签
有没有人知道这个工作的例子,或知道我可以挖掘或如果它甚至有可能?
var layout = {
title: 'Mt Bruno Elevation',
scene: {
xaxis: {
title: 'thisIsATest',
titlefont: {
color: 'red',
family: 'Arial, Open Sans',
size: 12
}
},
...
工作对我来说:
var layout = {
title: 'Surface Plot',
xaxis: {
title: 'This is a test'
}
};
Plotly.newPlot('someDiv', data, layout);
对于3D绘图你将有设置这些参数(X轴与Z以及):https://plot.ly/javascript/reference/#layout-scene-yaxis-title –
哎@ d-roy,我认为它不工作。我为所有3个轴设置标题和titlefont属性。这是一个jsfiddle https://jsfiddle.net/27cfgLet/2/ – sweetLew2