07-20-2022 03:13 PM - edited 07-20-2022 03:26 PM
I have large reports with many graphs of my datasets. Each X-axis scaling is set to fully automatic.
The problem is that if my data runs from -0.5 seconds to 0.5 seconds, fully auto will put the plot to -.6 to .6, or something similar. It always makes the x-axis larger than my data set and of course defeats the purpose of auto adjusting the damn thing.
if i play stupid games with the numbers such as truncating my data from -0.49 seconds to .49 seconds, sometimes it works. usually it doesnt and it doesnt seem to follow any particular pattern.
is there any way to manipulate what "fully automatic" is actually doing?
i cant go through all of my graphs each and every time i process data [dozens of sets each time] and correct the axis. I want my data to begin basically at the beginning of the x-axis.
anyone else dealing with this? I'm using diadem 2021 SP1
07-21-2022 09:12 AM
Hey.
I don't know about the idea behind this "fully automatic scaling", we use it just for quick-looks.
What you can try is to set the scaling to "fully manual", and then adjust it by script.
If not all your data go from -0.5s to +0.5s, could check it via "select case" in advance.
' scaling of time axis
For each oMyDia in Report.Sheets(1).Objects
If oMyDia.ObjectType = eReportObject2DAxisSystem Then
' get the test duration
iVal = Val(Data.Root.Properties("CHF_time").Value)
Set oMyYScaling = oMyDia.XAxis.Scaling
oMyYScaling.AutoScalingType = eAxisAutoScalingManual
oMyYScaling.Origin = 0 '
oMyYScaling.Begin = 0 '
' for max time the duration is rounded to the next 5 s UP
oMyYScaling.End = (TRUNC(iVal/5) + 2) * 5
' Tick 5s if test duration <80s; else 10s
oMyYScaling.Tick.Distance = (TRUNC(iVal/80) + 1) * 5
' Miniticks only if test duration > 80s
oMyYScaling.MiniTickCount = (TRUNC(iVal/80))
End If
Next
In Diadem 2015 it works quite fine.
And I believe, also in 2021 version this change can also be done completely per script...