Closed akinori8888 closed 7 years ago
I really appreciate your answer, I'll try that.
Additional question, sorry. Is there any function to describe the number in each cell of heatmap like the picture below in python-ternary?
Sorry for successive questions. I tried following to your answer, but there are three questions. I could set vmin and vmax
How to delete ticks outside the figure, vertical and horizontal ticks of (0,2,4,6,8,10)?
How can I set ticks numbers from (1,2,3,4,5,6,7,8,9,10) to (0.1,0.2,0.3,0.4 ....) ?
How to create subplots and put ternary graph inside the subplots? this is related to the previous question.
Is there any function to describe the number in each cell of heatmap like the picture below in python-ternary?
There's not a built in function but you could supply the coordinates and use tax.annotate(...)
to directly add the text.
- How to delete ticks outside the figure, vertical and horizontal ticks of (0,2,4,6,8,10)?
You can turn off matplotlib's axis ticks with
tax.clear_matplotlib_ticks()
- How can I set ticks numbers from (1,2,3,4,5,6,7,8,9,10) to (0.1,0.2,0.3,0.4 ....) ?
You can change the scaling or overwrite the tick values directly. See this example.
How to create subplots and put ternary graph inside the subplots? this is related to the previous question.
You can wrap the matplotlib axis for the subplot like so:
figure, ax = pyplot.subplots()
tax = ternary.TernaryAxesSubplot(ax=ax)
Or using gridspec
:
from matplotlib import pyplot, gridspec
pyplot.figure()
gs = gridspec.GridSpec(2,2)
ax = pyplot.subplot(gs[0,0])
figure, tax = ternary.figure(ax=ax)
Thanks for your kind answer, I made it!
If you'd like to contribute a plot to the examples please let me know!
I want to share color-bar between several ternary graphs which have individual value-range. For example, value-range of graph A is (0, 67), value-range of graph B is (65, 202) I want the color-bar which fits both of graph A and graph B.
Now, I have two color-bars and set of (color and number) does not match between A and B