yt-project / yt

Main yt repository
http://yt-project.org
Other
460 stars 276 forks source link

ENH: Annotate theta on theta slice plots #4574

Open matthewturk opened 1 year ago

matthewturk commented 1 year ago

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.

image

matthewturk commented 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$.

neutrinoceros commented 1 year ago

I've had this idea running in the back of my mind for a while, strong approve ! (Also, nice dataset 😇)

neutrinoceros commented 1 year ago

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:

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 ?