Horizontal color bar with vertical tick labels

I am working with a horizontal colorbar. How can I rotate the numbers to run vertically instead of being displayed horizontally like they are currently? They are all smashed into each other. I want to be able to do something like this (copied from a different reference – I’m not sure what visualization software they use).

Thanks!

Or, if this is not supported, could you give me a pointer as to where in the source code I could find the relevant code that govern the layout of the text in the colorbar labels? I might try implementing this feature.

Hi @sam_austin, you are running into this issue: https://gitlab.kitware.com/paraview/paraview/-/issues/20227

There is no option in ParaView to orient the text as you desire, but that is an interesting idea for a feature.

The code that generates the axis, including labels, is in VTK under VTK/Charts/Core/vtkAxis.h/.cxx. The color legend itself, which uses vtkAxis, is in ParaView under Remoting/Views/vtkContext2DScalarBarActor.cxx.

Great idea. Thanks for posting.

https://gitlab.kitware.com/paraview/paraview/-/issues/23161

Hi all, thanks for the response here. I will play around and see if I can get something working.

Thanks for this reference. Would you mind pointing me to the equivalent source file for the primary axis painters? It would help me resolve the other issue I posted: Remove Axis Tick Labels :

I see that the vtkAxis class supports independent booleans LabelsVisible and TicksVisible, although in vtkContext2DScalarBarActor.cxx the two are toggled together. This means that there is not a way to independently toggle the visibility of the tick marks and the numerical labels, which is precisely what I am trying to do in the other issue. I just need to locate the source for the primary axis configuration to implement this change.

Thanks!

vtkAxis handles all the axis painting. Or do you mean something else?

Got it, that’s what I’m looking for, thanks.