-
Notifications
You must be signed in to change notification settings - Fork 158
Ticks orientation #37
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
Comments
I know this is a bit confusing, but The label API is such that you tell The reason you got an error in the call for |
I am not very sure what you meant there. got even more confused after i go through the second comment on #18. but for example the bottom axis, in my case the axis goes anti-clockwise, so the bottom axis value i assume will go from left to right? if that the case, then the value suppose to increase rather than decrease from left to right of the bottom axis? |
The bottom axis will go from left to right in the counter-clockwise case. Think about tracing counter-clockwise around the triangle starting from any corner -- the values will be increasing in the direction of rotation. The same is true for the clockwise case. If that is not how the tick labels render for you, it could be another mac/anaconda difference. I just tested both orientations with your example code and they look correct to me. I could look into adding directional arrows like ggtern does. @CorySimon reported something similar with the ticks in issue #31, and said that this site helped understand ternary plots. If you are still convinced that the values are not being plotted correctly, please post code with a specific point (0.1, 0.4, 0.5). But note that the orientation permutes the indices as follows: |
I am pretty sure my plot are accurate as I am trying to reproduce a result of the paper I researching on and the point located pictorially for each value are almost the same. the red triangle in plot has the value (0.55,0.24,0.20), which is what i entered. but if i were to read off from the plot, is was (0.45, 0.76, 0.8) perhaps the anaconda i'm using renders different to yours? |
Note that I had to reverse the order of the tick labels in my example to get the labels on the axes correct. https://github.com/marcharper/python-ternary/blob/master/examples/color_coded_heatmap.py
|
@CorySimon it looks like I may have to do that, could you show me how I could modify my code? as I try to follow ur example but failed to get it modified for myself |
should work to reverse the ticks. @marcharper The way I view these plots, I agree with @hareyakana that the labels may be backwards in the defaults. |
@CorySimon I tired but i got this error instead. I also tried list the value individually as an argument into |
@hareyakana what line of code? |
Traceback (most recent call last): File "", line 1, in File "//anaconda/lib/python3.4/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 685, in runfile File "//anaconda/lib/python3.4/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 85, in execfile File "/Users/hareyakana/Desktop/Master project/flavour composition/ternaryplot.py", line 40, in File "//anaconda/lib/python3.4/site-packages/ternary/ternary_axes_subplot.py", line 264, in ticks File "//anaconda/lib/python3.4/site-packages/ternary/lines.py", line 241, in ticks TypeError: 'NoneType' object is not iterable i suppose the line |
@hareyakana As for the location of the points... for the There is still confusion on the following point. When you change the orientation, it changes the axes, just as in the ggtern plots, not just the tick mark directions and tick labels. This library, however, does not change the axes labels for you. If you say you want It is clear that the documentation needs to explain this much better, since it's not really reasonable to expect people to look back through earlier issues to understand this. So I'll update the readme to include some more explicit information. |
Ok, I've made a few changes. The standard ticks should work fine now and I've updated the example appropriately. The clockwise options should be more like what you expect, but note that the axis labels are unchanged as per the above comment. |
Im sorry for post this issue as it has been discussed before but things does not work the way i expected.
from the plot above, the point i plotted corresponds to the 3 value in point1, but if I were to read off from the plot the ticks labels are reversed. from @marcharper u suggested adding an argument to ticks, so i tried but it gave me error when i replace the ticks line to
TypeError: 'NoneType' object is not iterable
apologies again as this has been discuss before, but is annoying that the orientation of tick does not show the correct value I'm plotting.
edit: the value in point 1 correspond nu e,mu,tau respectively.
The text was updated successfully, but these errors were encountered: