Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The last two lines in the code above add the very last calibration series to the legend of the chart, underv under a generic name "Calibration results". The reason that this is done outside the loop is to avoid one entry in the legend for each calibration simulation.

Next, the measured data will be added to the plot as a point series. Subsequently, the chart object is created (still not shown).

Code Block
languagepy
titleAdding measured data to calibration graph
# create series for measurements
measurementsSeries = CreatePointSeries(measuredTimeSeries)
measurementsSeries.Title = "Measurements"
measurementsSeries.Color = Color.Red
measurementsSeries.Size = 4
measurementsSeries.LineVisible = True
measurementsSeries.LineColor = Color.Black
series.append(measurementsSeries)
chartCalibration = CreateChart(series)

The chart as a whole is now customized with different enhancements:

  • A name is added to the chart (view that will be opened later on).
  • A title is added to the graph, and then made visible as well as the legend of the chart (both are by default invisible).
  • Both axes get a title and the range for the vertical one (LeftAxis) is modified.

Finally, the view corresponding to the chart is opened containing at once all the improvement in layout and style previously implemented.