question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi 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()

Screenshot 2021-11-11 at 17 12 45

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:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
FedeClaudicommented, Nov 22, 2021

Happy days! Thanks for the help and contribution!

0reactions
RobertoDFcommented, Nov 22, 2021

Screenshot 2021-11-22 at 13 34 27 Perfect!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found