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.