3

If I generate a figure as:

fig = px.scatter_matrix(df, dimensions=columns, color=coloring_column)

I wonder how can I set the x-axes or y-axes to the logarithmic scale.

The fig.update_yaxes(type=scale) method or the keyword log_x is not included in the scatter_matrix function differently from the scatter function.

Thank you

Kat
  • 15,669
  • 3
  • 18
  • 51
adrckul
  • 43
  • 3
  • See this: [Axis range for log axis type](https://plotly.com/python/axes/#axis-range-for-log-axis-type) – r-beginners Dec 20 '22 at 10:00
  • @r-beginners log_x log_y are not valid keywords for scatter-matrix plots – adrckul Dec 20 '22 at 10:01
  • I don't have a [sample](https://plotly.com/python/splom/#scatter-matrix-with-plotly-express) to put it in log format, so I was able to log the x-axis with the example in the reference, and I think a similar code could be used for the y-axis as well. `fig.update_layout(xaxis=dict(type='log'),xaxis2=dict(type='log'),xaxis3=dict(type='log'),xaxis4=dict(type='log'))` – r-beginners Dec 20 '22 at 12:11

0 Answers0