ARM-software / trappy

This repository has moved to https://gitlab.arm.com/tooling/trappy
Apache License 2.0
60 stars 39 forks source link

ILinePlot: Add default group for zoom sync #262

Closed bjackman closed 6 years ago

bjackman commented 7 years ago

You currently have to specify a 'group' for the 'zync_zoom' parameter to work. However a likely use case is to plot multiple signals with a single ILinePlot call, and need them to be zoom-synced. For example, suppose we want to plot the frequency of all CPUs in a trace, on separate axes with zoom synced:

ILinePlot(ftrace, signals='cpu_frequency:frequency',
          pivot='cpu', drawstyle='steps-post',
          sync_zoom=True, group='my_group').view()

Here the use of 'my_group' seems unnecessary since it only occurs in one place.

Therefore use a hash of the ILinePlotGen object by default. This will make the above example work with 'group' omitted.