Hi,
I have below code to visualize data, and I want to ensemble a circle (heatmap inside big circle).
data is below:
I have below code to visualize data, and I want to ensemble a circle (heatmap inside big circle).
data is below:
helix1 phase helix 2 phase Energy -0.1 -0.1 1 -0.2 -0.2 0 -0.3 -0.3 0 -0.4 -0.4 2 -0.5 -0.5 8 -0.6 -0.6 7 0.8 0.8 9 0.9 0.9 1 0 0 0 0.1 0.1 0 0.2 0.2 0 0.3 0.3 0 0.4 0.4 0 0.5 0.5 1 0.6 0.6 2 -0.8 -0.8 7 -0.9 -0.9 15
%matplotlib inline import matplotlib.pyplot as plt import pandas as pd import numpy as np helix = pd.read_csv('E:\python\heatmaptest.csv') couple_columns = helix[['Energy','helix 2 phase', 'helix1 phase']] phase_1_2 = couple_columns.groupby(['helix1 phase', 'helix 2 phase']).mean() phase_1_2 = couple_columns.groupby(['helix1 phase', 'helix 2 phase']).mean() import numpy as np; import seaborn as sns; phase_1_2.pivot('helix1 phase', 'helix 2 phase','Energy').head() phase_1_2.pivot('helix1 phase', 'helix 2 phase')['Energy'].head() plt.figure(figsize=(9,9)) pivot_table = phase_1_2.pivot('helix1 phase', 'helix 2 phase','Energy') plt.xlabel('helix 2 phase', size = 15) plt.ylabel('helix1 phase', size = 15) plt.title('Energy from Helix Phase Angles', size = 15) sns.heatmap(pivot_table, annot=True, fmt=".1f", linewidths=.5, square = True, cmap = 'coolwarm')