I want to plot G2
matrix as a heatmap using plotly. My current output image's x-axis label and data are all overlapping (in the image below, all the values appear as a narrow line in the middle of the plot). How do I spread out the x-axis data and label?
import plotly.express as px
import numpy as np
from sklearn.decomposition import PCA
pca_G = PCA(n_components=q2)
G2 = pca_G.fit_transform(B)
# Plot mrna matrix G - PC2
G2_plot = px.imshow(G2, text_auto=True)
G2_plot.show()
G2 = array([[ 1.72178448e+01, -2.33298174e+01],
[-1.26179411e+01, 3.01668140e+00],
[ 8.80286288e+01, 5.24945962e+01],
[ 2.89470182e+00, -4.22463050e+00],
[ 2.71163138e+01, -2.77724948e+01],
[ 1.11949536e+02, 4.79459077e+01],
[ 3.79387126e+01, -5.02143816e+01]])