user11532986
user11532986

Reputation:

Scale issues on chart

I have a graph below made in plotly(python). I have set graph y-axis in log scale. but I don't know why there are intermediate values between 1000 and 10k like (2,3,4,5,6...). What they are representing? and how they are removed? I must want to remove. ![enter image description here]1

The properties of axis are given below

trace1 = {
  "x": [1, 2, 3, 4, 5], 
  "y": [500, 900, 1100, 10000, 300], 
  "marker": {
    "color": 'rgb(255,140,0)', 

  }, 
data = Data([trace1])
layout = {
  "autosize": False, 
  "bargap": 0.0, 
  "height": 480, 
  "hovermode": "closest", 
  "margin": {
    "r": 63, 
    "t": 57, 
    "b": 52, 
    "l": 80, 
    "pad": 0
  }, 
  "showlegend": False,  
  "titlefont": {
    "color": "#000000", 
    "size": 12.0
  }, 
  "width": 640, 
  "xaxis": {
    "anchor": "y", 
    "domain": [0.0, 1.0], 
    "mirror": "ticks", 
    "nticks": 9, 
    "range": [0.5, 10.5], 
    "showgrid": False, 
    "showline": True, 
    "side": "bottom", 
    "tickfont": {"size": 20.0}, 
    "ticks": "inside", 
    "title": "x-axes", 
    "titlefont": {
      "color": "black", 
      "size": 22.0
    }, 
    "type": "linear", 
    "zeroline": False
  }, 
  "yaxis": {
    "tickmode":'auto',
    "ticks":'outside',
    "tick0":0,
    "dtick":100,
    "ticklen":8,
    "tickwidth":4,
    "anchor": "x",  
    "mirror": "ticks",
    "domain": [0.0, 1.0],
    "nticks": 6,  
    "showgrid": False, 
    "showline": True, 
    "side": "left", 
    "tickfont": {"size": 20.0}, 
    "ticks": "inside", 
    "title": "y-axis",
    "titlefont": {
      "color": "black", 
      "size": 22.0
    }, 
    "type": "log", 
    "zeroline": False,
  }
}
fig = dict(data=data, layout=layout)
py.plot(fig, filename='"log-no-log"')

Upvotes: 2

Views: 145

Answers (1)

lidrariel
lidrariel

Reputation: 79

The numbers represent the intermediate multiples until you get to the next order of magnitude. The first 3,4,5 etc. represent multiples of 100 until you reach the tick 1000. Then it will be the markers for multiples of 1000 until you reach 10k. Because of the logarithmic scale, they are not drawn equidistand.

So they might be useful if you want to read from the graph what your value at e.g. x=2 is.

Upvotes: 1

Related Questions