-
Notifications
You must be signed in to change notification settings - Fork 157
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
Issues with corner label positions under panning/zooming #203
Comments
Explanation: This is a rendering issue. You can find it here: Known-Issues. Solution 1: If you want to use
Solution 2: Instead of calling
|
@bmondal94 Thanks. The labels are still incorrectly positioned after panning/zooming. They should be positioned at the vertices of the triangle, but appear to be fixed to the UI layer. |
Dear @carlosgmartin ,
Here is an example of data-coordinate vs axis-coordinate (orginal source)
Although you can move or zoom other texts but not the Now, coming back to the ternary plot problem;
Solution:
Simple enough. But we are not finished yet. Because the axes labels use offset values to nicely position the labels. But as now we are rescaling the data we have to take care of rescaling the offset values as well. After a few trials and error, I found the best options are:
BTW, I do not know why most of the offsets are divided by 2. So, I kept the 'previous factors' as it is and did minimal changes. Final images: I still did not update the title coordinate. The title is still attached to the axes coordinate. Sorry, for the long answer. |
BTW, there is an alternative solution if you do not want to change the source code. (source code is taken from)
|
I'm having some issues with the corner labels:
When the plot is first shown, the corner labels are missing:
Only after panning or zooming once do the labels appear (they also appear in the saved figure, if I save it):
Furthermore, the corner labels are positioned incorrectly under panning or zooming:
I am using macOS 11.7, python 3.10.9, matplotlib 3.6.3, and python-ternary 1.0.8.
The text was updated successfully, but these errors were encountered: