forked from frankligy/python_visualization_tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Guangyuan Li
authored and
Guangyuan Li
committed
Jan 2, 2021
1 parent
01aae3d
commit 1593561
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import matplotlib as mpl | ||
import matplotlib.pyplot as plt | ||
from matplotlib.ticker import MultipleLocator,FormatStrFormatter,MaxNLocator | ||
|
||
a = pd.Series(list(mpl.rcParams.keys())) | ||
|
||
|
||
mpl.rcParams['pdf.fonttype'] = 42 | ||
mpl.rcParams['ps.fonttype'] = 42 | ||
mpl.rcParams['font.family'] = 'Arial' | ||
|
||
fig = plt.figure() | ||
mpl.rcParams['figure.figsize'] # [6.4,4.8] 6.4 is the width, 4.8 is the height | ||
fig = plt.figure(figsize=(10,6)) | ||
ax = plt.axes((0.1,0.1,0.5,0.8)) | ||
ax.spines['right'].set_visible(False) | ||
ax.spines['left'].set_visible(False) | ||
ax.spines['bottom'].set_visible(False) | ||
ax.spines['top'].set_visible(False) | ||
ax.tick_params(axis='x',which='major',direction='out',length=10,width=5,color='red',pad=15,labelsize=15,labelcolor='green', | ||
labelrotation=15) | ||
ax.set_xticks([0.2,1]) | ||
ax.set_xticklabels(['pos1','pos2']) | ||
|
||
ax.yaxis.set_major_locator(MultipleLocator(0.5)) | ||
ax.yaxis.set_minor_locator(MultipleLocator(0.1)) | ||
|
||
a=ax.yaxis.get_major_locator() | ||
b=ax.yaxis.get_major_formatter() | ||
|
||
ax.grid(True,which='major',axis='both',alpha=0.3) | ||
|
||
c = ax.get_xticks() | ||
d = ax.get_xticklabels() | ||
|
||
fig,axes = plt.subplots(nrows=4,ncols=4,figsize=(10,6)) | ||
fig,axes = plt.subplots(nrows=4,ncols=4,figsize=(10,6),gridspec_kw={'wspace':0.5,'hspace':0.5}) | ||
|
||
|
||
|
||
|
||
|