Labels position
See original GitHub issueHi Federico, Labels are misplaced and upside down. You can reproduce it using your example add_labels.py.
from brainrender import Scene
from rich import print
from myterial import orange
from pathlib import Path
print(f"[{orange}]Running example: {Path(__file__).name}")
# crate a scene and add brain regions
scene = Scene()
th, mos = scene.add_brain_region("TH", "MOs")
scene.add_label(th, "TH")
scene.add_label(mos, "My region")
# render
scene.render()
The upside down is solved easily by changing:
https://github.com/brainglobe/brainrender/blob/19c63b97a34336898871d66fb24484e8a55d4fa7/brainrender/actor.py#L73 to
txt.pos(x=0, y=0, z=0).rotateX(0).rotateY(180).pos(p)
but I couldn’t solve the position yet, do you have any ideas?
I’m using brainrender 2.0.4.4 on Ubuntu.
Cheers!
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
How To Determine Your Label Copy Position
The Label Copy Position is the position (or direction) of the artwork. It's the way the copy or text is oriented as it's...
Read more >Specify a point label position
The label placement position is the first placement property you set for a label class. There are 10 predefined Maplex Label Engine placement...
Read more >Label Placement | GEOG 486: Cartography and Visualization
Ideal label placements are always context dependent—many factors, such as the density of map features or character length of place names, will determine...
Read more >Automatic label placement
Automatic label placement, sometimes called text placement or name placement, comprises the computer methods of placing labels automatically on a map or ...
Read more >Label Placement in Forms
Label position—Placing a label above an input field works better in most cases, because users aren't forced to look separately at the label...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Happy days! Thanks for the help and contribution!
Perfect!