javascript - 对数y轴的plotly js范围
问题描述
是否可以在 10 之后不显示日志编号并显示下一个值,例如 20、30、40,需要类型的日志
var trace1 = {
x: [1, 2, 3, 4, 5, 6, 7, 8],
y: [1,10,20,40, 14, 12, 10, null, 15],
mode: 'lines+markers',
connectgaps: true
};
var trace2 = {
x: [1, 2, 3, 4, 5, 6, 7, 8],
y: [16, null, 13, 10, 8, null, 11, 12],
mode: 'lines',
connectgaps: true
};
var data = [trace1, trace2];
var layout = {
title: 'Connect the Gaps Between Data',
showlegend: false,
yaxis: {
type: 'log',
}
};
Plotly.newPlot('myDiv', data, layout);
解决方案
推荐阅读
- java - Spark SQL 嵌套数组和 bean 支持
- javascript - 违约云火库功能
- php - 改进此正则表达式以防止 preg_replace 抛出 PREG_BACKTRACK_LIMIT_ERROR
- go - CheckErr(err)函数在golang中崩溃
- ideavim - 映射以在 IdeaVim 中用动作注释掉多行?
- node.js - 如何使用 fs 将文件写入节点 js 上的远程服务器 url?
- android - Android 模拟器 (v28.0.23) 无法发出 HTTP 请求
- r - 通过删除重复列来压缩数据框,同时保留额外的相应信息
- css - 如何在 CSS 中使内部 div 不透明度为 1?
- r - 无法从 R 循环中的 lqmm 函数中提取 p_value