Open matthewturk opened 1 year ago
At the very least, having theta identified somewhere when we are not slicing at the plane would be helpful too. Maybe even trying to figure out if it's a fraction of $\pi$.
I've had this idea running in the back of my mind for a while, strong approve ! (Also, nice dataset 😇)
I made an attempt at implementing the second part (removing sin(theta)
when it's equal to 1). I've identified a couple hurdles to overcome to make this possible:
Coordinates
object through a generic interface that has no idea what the data source is (see https://github.com/yt-project/yt/blob/39277625a9ab3676f3eaeaa1a46527794eb1b9e3/yt/visualization/plot_window.py#L1141), this would need to be changed so that the theta
coordinate of a slice could be taken into account (possibly all Coordinates
subclasses would need a small update)Suddenly this feels like a much bigger effort than the result may be worth.
Annotating theta
may also be harder than expected to get right: no matter where we'd choose to add this annotation, it could easily clash with existing annotation methods (timestamps, scale, title ...). Maybe it should just be included in the axis labels themselves, but then we're back to the first problem on my list.
I also note that overriding default labels, and adding arbitrary text annotations are supported operations. All in all, and despite my enthusiasm for having such a feature, I'm not convinced it's worth the effort. Default behaviour is very hard to get right for everyone, maybe it's enough that it's possible to more with customisation ?
The axes of slice-along-theta plots in spherical geometry includes the term sin(theta). We should perhaps put somewhere that we are slicing along theta, and what that theta is, to make it more obvious. And in the simple case of theta being aligned with the cartesian xy plane, we should remove the term from the axis label.
For instance, I've sliced at $\theta = \pi/2$. So for this, we should just get rid of the term.