Problem 1627

Summary: removing labels automatically drawn with coordinate axes
Product: Geant4 Reporter: martin.stieben
Component: visualization/OpenGLAssignee: John.Allison
Status: RESOLVED FIXED    
Severity: trivial    
Priority: P5    
Version: 10.0   
Hardware: All   
OS: All   
Attachments: example image

Description martin.stieben 2014-05-15 16:54:00 CEST
Since Version 10.0 the command "/vis/scene/add/axes 0 0 0 5 mm" draws coordinate axes together with a label "5 mm" at each axis. These labels always overlap with the (same colored) drawn axis lines and are not readable by default. 
How do you manipulate the properties of these labels (position, size, color, text) or how do you completely deactivate them? 
You can find an example image attached.
Comment 1 martin.stieben 2014-05-15 16:55:10 CEST
Created attachment 270 [details]
example image
Comment 2 John.Allison 2014-05-16 10:26:25 CEST
Thanks for pointing this out.  It somewhat depends on the length of the axes.  Deciding where to put the annotations was, perhaps, not well thought out.

If this is important to you right now, I suggest you suppress the annotation by changing

    G4VModel* model = new G4AxesModel
    (x0, y0, z0, length, arrowWidth, colourString, newValue);

to

    G4VModel* model = new G4AxesModel
    (x0, y0, z0, length, arrowWidth, colourString, newValue, false);

near line 345 in G4VisCommandsSceneAdd.cc and add your own annotations with /vis/scene/add/text (use help to get guidance).

Alternatively you could play with the hard-coded parameters in G4AxesModel.cc.

I'm open to suggestions as to how to improve it.  I suggest, at least, adding a parameter to /vis/scene/add/axes to allow the user to suppress the annotations.
Comment 3 John.Allison 2014-05-25 14:49:39 CEST
For next release: Added a parameter to /vis/scene/add/axes to suppress annotations.