-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing targets in plot_airmass and wrong values #576
Comments
If you run this addition to your code: import numpy as np
times = time + np.linspace(-12, 12, 20) * u.hour
for target in targets:
max_altitude = max(telescope.altaz(times, target).alt)
print(f"{target.name} reaches max(alt): {max_altitude:.1f}" ) You'll see that only one target would fall within the axis limits on this plot:
You're seeing the airmass curve for How are you comparing to the results from other software? |
Hi @bmorris3, you are right. The One last issue I have noticed is the lack of a legend even after adding: plt.legend(shadow=True) I thought it would use the names of the Targets. I also tried to declare the labels using the |
This is very weird. It looks like everything is working now including the legend. I did not modified the code in any way. Closing this for the moment. Thanks for your support, @bmorris3. I really appreciate it 🚀 |
Opening this again. Using a "dummy" loop displays the legend with all labels: # Displays the legend
for _ in targets:
plot_airmass(
targets,
telescope,
time,
altitude_yaxis=True,
brightness_shading=True,
style_kwargs={"linestyle": "--"},
max_airmass=5,
)
plt.legend(shadow=True)
plt.show() But without the loop the legend shows empty. |
Using a custom ax solves the issue. |
🐞 Problem
I wanted to study the visibility of two comets. The coordinates for the comets are stored in a
comets.dat
file:The main code looks like this:
The output figure is this one:
Note that there is only one object instead of two. Furthermore, the values being displayed in the graph are not the ones I get with other software (KStars and Stellarium) for the same location and time.
I am missing something in my code? The documentation and tutorials are very clean and detailed on how to use the library.
The text was updated successfully, but these errors were encountered: