Hi, I am plot a contour figures, the range for x axis is large from 0.01 to 100, y axis is from 0 to 15.
such as
Q_0 = [0.01, 0.02, 0.05, 0.08, 0.15, 0.4, 1., 5., 10., 20., 50.], w_0 = [0., 1., 2., 3., 4., 5., 8.,15].
the z value I generate is like this code:
[for q in Q_0:
for w in w_0:
z.append(f(q,w))
x.append(q)
y.append(w)
Then the contour plot:
> fig = go.Figure(go.Contour(
x = x.reshape(-1),
y = y.reshape(-1),
z = z.reshape(-1),
colorscale = 'Blues',
contours = dict(
showlabels = True,
labelfont = dict(
family = 'Raleway',
color = 'white'
)
),
hoverlabel = dict(
bgcolor = 'white',
bordercolor = 'black',
font = dict(
family = 'Raleway',
color = 'black'
)
)
))
fig.update_layout(
xaxis_title="$Q_0$",
yaxis_title="$w_0$",
xaxis = dict(
tickmode = 'array',
# tickvals = [i for i in range(0,len(q_prior_rows.reshape(-1)))],
tickvals = [i for i in Q_priors],
ticktext = [str(i) for i in Q_priors]
),
yaxis = dict(
tickmode = 'array',
# tickvals = [i for i in range(0,len(w_prior_rows.reshape(-1)))],
tickvals = [i for i in w_prior_rows[0:,]],
ticktext = [str(i) for i in w_prior_rows[0:,]]
)
)
fig.show()
and get the figure like this:
How can I make the axis tick equal distributed similar as label but not by value. for example, 5.0~10.0 has the same distance with 10 to 20, 20 to 50.