WorldWideTelescope / pywwt

Python interface to WorldWide Telescope :milky_way:
https://pywwt.readthedocs.io
BSD 3-Clause "New" or "Revised" License
51 stars 15 forks source link

Add text annotations #68

Open philrosenfield opened 6 years ago

philrosenfield commented 6 years ago

It would be nice to add text with the other annotations for example, following matplotlib.text

wwt.add_circle(center, radius=radius)
wwt.add_text(string, xy=center, xytext=None, size=size, xycoords=canvas)

where xycoords would specify to tie the text to the WWT base layer or to the monitor.

astrofrog commented 6 years ago

I agree, this would be handy!

philrosenfield commented 6 years ago

FYI there is a workaround, but it's a little unclear to me how to trigger the text on and off with clicking/zooming (using qt): wwt.add_circle(center, radius=radius, label=somestring)

ojustino commented 6 years ago

The label and hover_label arguments for wwt.add_circle() are the standard way to add a label and make it visible. They also exist for wwt.add_line() and wwt.add_polygon(). I don't see how else to work with labels or otherwise add standalone text in the Web Control documentation, so is it currently possible access this ability?

I agree with Phil that it's hard to find what exactly triggers the label's appearance when using the viewer. It only shows up intermittently when I drag the view.