How to hide minor ticks label in Plotly JS

How to hide the minor ticks label in plotly js

var trace1 = {
  x: [0.8, 0.7,0.6, 0.5, 0.4, 0.3,0.2, 0.1,0.001],
  y: [0.8, 0.7,0.6, 0.5, 0.4, 0.3,0.2, 0.1,0.001],
  type: 'scatter'
};

var data = [trace1];

var layout = {
  xaxis: {
    type: 'log',
    autorange: true,
     autorange: true,
      dtick: 1,
     exponentformat: "power",
    tickmode: "auto",
  },
  yaxis: {
    type: 'log',
    autorange: true,
      dtick: 1,
    rangemode: 'tozero',
     tickmode: "auto",
    tickformat:"",
     exponentformat: "power",
  }
};

could define y-axis tickmode as array, and list the labels and lines you want to see?

    tickmode: "array",
    tickvals: [0.1, 1, 10, 100, 1000],
    ticktext: ['0.1', '1', '10', '100', '1000'],
1 Like

2 issues with this approach

  1. minor ticks is not available, and not scalable if range is dynamic
  2. even if somehow managed to handle fist issue, exponentformat: "power" wont have effect in this
  1. minor ticks is not available, and not scalable if range is dynamic

Was the objective not to hide minor ticks?

No, I want to hide only the tick labels ,
expected result:

for the array tick mode I suggested, are you against adding the additional tickvals, but with empty ticktext? I’m not certain if there are other alternatives.