-
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
Scatter plot colorbar and normalization #101
Comments
Hi, take a look at #75 for an example on how to color individual points. As for the normalization, you'll need to do that before plotting. I'm not sure why you don't see a colorbar. Can you post your code? |
Hi, Thanks for your reply. I wused one of the examples in github and though I managed to get a colorbar, I am confused about all the kwargs I included since I just copied someone else's code without fully comprehending the meaining of each parameter and whether they were necessary or not. Why is it necessary to declare Regarding the normalization I used the logarithm because i could not figure out how to do it. Thanks. Pasting my code below
|
It's probably just an oversight because cm is passed through to matplotlib. You need |
Thanks a lot, I have reworked my code and managed to do what I intended. One reason is because it is easier to look at the colors. But another reason is that even if I manage to normalize the colormap to logarithmic scale, I am not able to have the colorbar in logarithmic scale. I have pasted the new code. On the left side I am plotting the logarithm of the values, and on the right the values with a log-normalized colormap. In that way you see that the ternary plot are plotting the same things. Nevertheless I still do not figure out how to make the colorbar in the correct scale.
|
Thanks for the report. The reason is that |
Thanks for this issue. It help me solve my plotting issue of a scatter with colors and a colorbar. I now understand that we need having both: I had only colormap, and was wondering why my dots where not getting the right colors! |
Hi. Thanks for developing this. This has been a life-saver. I just had a couple of questions that may or may not be related to python-ternary. I am making some scatter plots. I have a table with 3 parameters that add up to 100. I have also a 4th parameter and was planning to color the markers with a color depending on the value.
What I did not manage to see is to get the colorbar displayed (I set the boolean to True).
Also, my 4th parameter cover different orders of magnitude which means I need to log-normalize and set vmin/vmax, do you know how I could do that?
The text was updated successfully, but these errors were encountered: