Problem 1627 - removing labels automatically drawn with coordinate axes
Summary: removing labels automatically drawn with coordinate axes
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: visualization/OpenGL (show other problems)
Version: 10.0
Hardware: All All
: P5 trivial
Assignee: John.Allison
URL:
Depends on:
Blocks:
 
Reported: 2014-05-15 16:54 CEST by martin.stieben
Modified: 2014-05-25 14:49 CEST (History)
0 users

See Also:


Attachments
example image (59.76 KB, image/png)
2014-05-15 16:55 CEST, martin.stieben
Details

Note You need to log in before you can comment on or make changes to this problem.
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.