-
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
Blank Heatmap #197
Comments
|
Don't worry. |
Hello, @sdebesai : Were you able to work around your issue? I'm interested in using this library/package and I am stuck as you were. And, @bmondal94 , I tried to follow your advice in this discussion and even then I was not able to get pass the issues found by @sdebesai. I'm assuming I'm missing some key concept or key configuration but I am not sure what. This is the plot I was able to get using the script by @sdebesai and your advices: |
Dear @disouzam ,
|
Thanks a lot, @bmondal94 , for your quick and kind reply! Your corrected script now works perfectly here as seen in the picture below. Now my task will be to transfer this knowledge to my real case example (plot a CaO-MgO-SiO2-Al2O3 phase diagram, with MgO fixed at 10% and poles representing CaO, SiO2 and Al2O3). I've tried earlier with no success. I will tune the script you provided to me as a baseline. |
Hi,
First I wanted to say thank you for creating such a well documented and useful package. I am attempting to use the heatmap() function but my current output is just a blank plot and I'm having trouble understanding why. I tried creating a dictionary where I mapped points to random values instead of the actual data I'm attempting to plot to see if it was an issue with my data but that's not working either. I think I'm likely doing something silly (maybe in my data generation?) but am pretty stuck and would appreciate any insight. As a note I'm omitting the boundaries where a coordinate is 0 because the distribution I hope to eventually plot behaves weirdly there, but this is something I intend to address later. Here's the code snippet:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import ternary
import random
def gen_rand_data(f1_list_all=np.linspace(0,1,100)):
data = {}
for f1 in f1_list_all:
if f1 != 0:
f2_list=f1_list_all[np.where(f1_list_all< 1-f1)]
f1_list=f1*np.ones(f2_list.shape[0])
def main():
f1_list_all=np.linspace(0,1,100)
#data, Z=gen_data(f1_list_all)
data = gen_rand_data(f1_list_all=np.linspace(0,1,100))
Thank you!
The text was updated successfully, but these errors were encountered: