Basic Plotting
Getting Ready
Import packages
import numpy as npfrom numpy.random import randnimport matplotlib.pyplot as pltimport pandas as pdfrom pandas import Series, DataFrame,date_rangefrom matplotlib import cmRead in data
dat=pd.read_csv("C:\\Users\duan\Desktop\PythonDataProcessingVisualization\metaDataMean.txt", sep='\s+')dat
Line Plot


For list of named colors see here
Change plotting style and add legend

Bar Plot

add a horizontal line

plot horizontal bars


Histogram Plot

Box Plot

Define a title

Boxplot by celltype

Better layout by excluding the automatic title

More sophisticated plotting can better reveal the trend

Last updated
Was this helpful?
