Hello,
Posted this on StackExchange, got nothing so far, decided to get more
targeted
I have Mayavi2 code in Python 3 using mlab that draws a spherical glyph
at a specific location, then adds a mlab.Text object at the same 3D
location, e.g. if a sphere glyph has already been placed at 3-D location
(px,py,pz), then adding the Text object like this:
Using the recorder, I discovered how to set the properties:
textobj = self.scene.mlab.text(px,py,plabel, z=pz, name='Label '+plabel,
color=self.modelcolors['labelcolor'],width=self.Text*0.004)
textobj.property.bold = True # this works just fine, text becomes bold
textobj.property.justification = 'centered' # moves Text far away ?
textobj.property.vertical_justification = 'centered' # also far away ?
My goal is to get the text centered over the spherical glyph, but the
result, as evidenced in the comments, is that the text is displayed at a
location far away from the original glyph.
How can I get the effect I'm looking for here?
Thanks in advance,
Steven Kirk
--
Prof. Steven R. Kirk (steven.k...@cantab.net, su...@hunnu.edu.cn)
100 Talents of Hunan Award Recipient
College of Chemistry and Chemical Engineering, Hunan Normal University
36 Lushan Road, Changsha 410081, Hunan Province, P.R. China
Website: http://www.beaconresearch.org
orcid.org/0000-0002-0462-6962
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MayaVi-users mailing list
MayaVi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users