Hi, I'm trying to generate a heatmap using bioinfokitlibrary in python, and I need to scale the colour bar from 0 to 2 .How can I control the scale of the colour bar?
this is my code
I also tried to use the seaborn library where the scale can beeasily controlled but the heatmap does not show all the rows, thereare 120 rows in the data set but the heatmap only shows 50
this is my second code
Any suggestion to solve any of the codes would be greatlyappreciated. Thanks in advance
import pandas as pd import pandas as pd import matplotlib.pyplot as plt import numpy as np from pandas import ExcelFile from bioinfokit import analys, visuz import seaborn as sns import csv import scipy.stats as stats Cars_Path =('gene.xlsx') df = pd.read_excel(Cars_Path) df.set_index(df.columns[ θ]. head() visuz.gene_exp. hmap(df=df, rowclus=False, colclus=False, dim=(10, 20), tickfont=(7, 6), show=True, cmap="rainbow")
import numpy as np import matplotlib matplotlib.use('tkagg') import matplotlib.pyplot as plt import seaborn as sns import matplotlib.pyplot as matplt import seaborn as sebn import pandas as pd from matplotlib import pyplot as plt Cars_Path = ('gene.xlsx') pd.read_excel(Cars_Path) # Load the excel file into the Dataframe DF DF = pd.read_excel(Cars_Path) DF = DF.set_index(DF.columns[ ] # Plot a Heatmap graph using seaborn (sebn) matplt.figure(figsize=(10,10)) # print heatmap by sending complete dataframe values into it. sebn. heatmap(data=DF, annot=False, xticklabels=True, cmap=' rainbow' ) plt.savefig("output.png")
Hi, I'm trying to generate a heatmap using bioinfokit library in python, and I need to scale the colour bar from 0 to 2
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Hi, I'm trying to generate a heatmap using bioinfokit library in python, and I need to scale the colour bar from 0 to 2
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!