How to Change the Scale of a 2D Graph in DIAdem Report Using Python

Updated Apr 26, 2023

Environment

Software

  • DIAdem

Programming Language

  • Python

This article explains the process of changing the scale of a 2D graph in a DIAdem report using Python. It covers the steps involved in setting the scale of the X and Y axes to a particular range.

Changing the scale of a 2D graph in a DIAdem report using Python,can be accomplished by using the Scaling property of the XAxis or YAxis object of the graph. For example,in order to change the scale of the X axis of the graph, refer to the following code:
object = dd.Report.Sheets("sheetNumber").Objects.Item("2DgraphName") object.XAxis.Scaling.Begin = 0 object.XAxis.Scaling.End = 100

This will set the X axis scale to a range of 0 to 100.

To change the scale of the Y axis of the graph, use similar code as for the X axis:
object.YAxis.Scaling.Begin = 0
object.YAxis.Scaling.End = 100

This will set the Y axis scale to a range of 0 to 100.