Home > Back-end >  Plotting rows and columns of big data in an interpretable way
Plotting rows and columns of big data in an interpretable way

Time:07-01

I have the attached data set and wanted to visualize it.

part of data

For small data sets, the visualization looks nice like the attached

nice plot

but for large datasets, it is hard to interpret as attached too

hard to interpret

I used the following code to visualize it.

import matplotlib.pyplot as plt
plot = TMA_A_B_cells_surroundings_distance.plot.bar()
plot.set_xlabel("B cells", color='red')
plot.set_ylabel("Distance", color='red')
plot.tick_params(axis='x', colors='red') 
plot.tick_params(axis='y', colors='red')

plt.title('Cell Cell distance', color='white')
plt.legend(loc='center left', bbox_to_anchor=(1.0, 0.5))


fig.savefig(fname='TMA_A_Distance_reg021.png', 
bbox_inches='tight')
plt.show()

I tried to make it as a scatter plot but got errors. Could you help in making it a scatter plot or any other interpretable plot?

CodePudding user response:

I used histogram and it worked fine

CodePudding user response:

Even your "nice" plot is not interpretable as it is. See how your .03 and your .13 are the same color? I would separate the plots for each B cell if that is meaningful to you, or perhaps plot them as facets so that the color among them stay the same.

  • Related