I'm trying to use plotly violin plot for a logarithmic data set with positive values only.
when I use the regular violin aka:
fig= go.Figure()
fig.add_trace(go.Violin(x=last_value, line_color=color, name=round(leverage, 3),spanmode='hard'))
fig.update_traces(orientation='h', side='positive', width=3, points=False)
fig.show()
I get :
adding the line
fig.update_xaxes(type='log')
I get
As the data is supposed to reflect probabilities a log transformation yields the following.
fig.add_trace(go.Violin(x=np.log10(last_value), line_color=color, name=round(leverage, 3),spanmode='hard'))
The problem is that I want the x-axis and hover data to reflect the actual data, not the log10 of the data. Is there any way to achieve this?
A short summed up example code :
last_value=np.load('data.npy')
fig=go.Figure()
fig.add_trace(go.Violin(x=last_value, spanmode='hard'))
fig.update_traces(orientation='h', side='positive', points=False)
fig.update_xaxes(type='log')
fig.show()
fig=go.Figure()
fig.add_trace(go.Violin(x=np.log10(last_value), spanmode='hard'))
fig.update_traces(orientation='h', side='positive', points=False)
fig.show()
the data file is uploaded here:


