How to change axis to log scale for Mechanical charts?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 452
100 Answers 250 Likes 100 Comments First Anniversary
✭✭✭✭
edited June 2023 in Structures

How to change axis to log scale for Mechanical charts?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 452
    100 Answers 250 Likes 100 Comments First Anniversary
    ✭✭✭✭
    Answer ✓

    For log scale you need to first get the axis you want to set to log-scale and then select if you would like the common log or the natural log, example code

    x_axis = figure.axes.get("bottom")
    x_axis.Logrithmic = chart.LogBase.LogBaseCommon  # For common log
    y_axis = figure.axes.get("left")
    y_axis.Logrithmic = chart.LogBase.LogBaseNatural  # For natural log