Comments (10)
I think the example you want to follow is the colored scatter plot. It looks to me like the scatter plot colors are being set by the cmap parameter (which is the viridis color map by default). To make the points circles the marker parameter should be marker='o'.
So it's possible that there is a bug with the colormap parameters / precedence. If that is the case, let me know and I'll fix it.
from python-ternary.
Dear Marc,
Thanks a lot for quick response. I believe colorbar_kwargs.py is best for me. Because it has labels in 3 edges of the triangle (namely element x,y anz z compositions). So my compound can be understood easily. Also in later I may try to write the label next to my circles (such as X_(2)Y_(5)Z_(2)), so the reader can understand better.
I have only the problem that c values that I entered are not plotted correctly according to the color bar scale. Do you think it is because viridis ?
Making markers circles are completely fine :)
from python-ternary.
Try using the cmap argument instead.
from python-ternary.
Great ! That works, thanks a lot 👍
from python-ternary.
Great, thanks for the report. I'll update the functions to remove the duplicate colormap parameter.
from python-ternary.
btw, short question: how can I change the fontsize and ticks in colorbar in colorbar_kwargs.py ?
from python-ternary.
The kwargs simply get passed through to matplotlib so you have to use the parameters as expected by those functions. If you need examples, search for e.g. "changing matplotlib colorbar ticks" and you should get several examples from stack overflow and other sites.
from python-ternary.
Dear Marc,
I was trying hard but could not really figure out. I did the corresponding changes in the colorbar_kwargs.py code:
cb=tax.scatter(points,marker='o',c=c,cmap=plt.cm.jet,edgecolor='k',s=80,linewidths=0.5,
vmax=0.04,vmin=-1.95,colorbar=True,colormap=plt.cm.jet, cbarlabel=' Free Energy per atom (eV)',
cb_kwargs=cb_kwargs, zorder=3)
ticklabels=cb.get_yticklabels()
cb.set_yticklabels(ticklabels, fontsize=100)
cb.tick_params(labelsize=100)
but still it is not working. Could you please give me further advices ?
from python-ternary.
The colorbar arguments need to go in the cb_kwargs
dictionary, e.g. take the existing cb_kwargs
and add fontsize
:
cb_kwargs["fontsize"] = 100
Then pass cb_kwargs
to tax.scatter
as above. Note that 100 is a very large fontsize...
from python-ternary.
Colorbar arguments clarified in the master branch, closing as fixed.
from python-ternary.
Related Issues (20)
- Alternate orientation hexagon HOT 1
- ternary does not seem to use third axis value when plotting lines HOT 3
- Scatter creates equilateral plot HOT 1
- Question on ternary heatmap plot HOT 1
- Can not set the limits of each axis? HOT 1
- Heatmap scale greater than 1 vs less than equal to 1 HOT 4
- Cut off top of triangle? HOT 5
- Problem in making the ternary heatmap if the key interval is not 1. HOT 1
- TernaryAxesSubplot.scatter() skips first default color in version 1.0.8 HOT 1
- How to plot the Ternary Choropleth Map? HOT 3
- Heatmap polygon triangles and gridlines don't meet exactly HOT 4
- Blank Heatmap HOT 6
- Plot Blocking Option
- Custom Axis Directions HOT 2
- Cannot set transparent background HOT 1
- Issues with corner label positions under panning/zooming HOT 4
- change font, and output an equilateral triangle HOT 2
- Can't find a way that works to reduce label overlap. HOT 2
- Update installation metadata
- Remove number
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-ternary.