Otherwise, there’s this VTK class : vtkChartHistogram2D that is, IMHO, a better solution to display a 2D spectrogram (or color map) and that has a builtin scalar bar, I don’t know if a Python wrapping exist for this last (and you will have to use the VTK that is in the gitlab master branch, as recently I fixed nasty bugs in it).
What I meant was that I’d like to add visible ticks (i.e. a straight line pointing from label to color) to text in scalarColorBar to help correct interpretation of actual values from color bar. There is this LeaderLineColor method that according to the documentation should do what I want to perform, but nothing is displayed. I know that this should be possible ( e.g. Paraview project which uses VTK has those nice color bars)
I take a look to the C++ source code of vtkScalarBarActor (VTK) and vtkPVScalarBarActor (ParaView, which inherits from vtkScalarBarActor), and the feature you want exists only in ParaView, where the ticks marks are created with a vtkActor2D (TickMarksActor), a mapper (vtkPolyDataMapper2D) and a poly data (vtkPolyData).
One with enough free time and will can add this feature in vtkScalarBarActor from vtkPVScalarBarActor (it is not very hard) and creates a Python wrapper.