For the complete documentation index, see llms.txt. This page is also available as Markdown.

Basic Plotting

Getting Ready

Import packages

import numpy as np
from numpy.random import randn
import matplotlib.pyplot as plt
import pandas as pd
from pandas import Series, DataFrame,date_range
from matplotlib import cm

Read 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?