Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.pyplot as plt
- import pandas as pd
- plt.rcParams['axes.grid'] = True
- fig,ax=plt.subplots(3,2,figsize=(10,6))
- df1=pd.read_csv(r"D:\Users\abc\cov60.csv")
- df2=pd.read_csv(r"D:\Users\abc\cov75.csv")
- df3=pd.read_csv(r"D:\Users\abc\cov85.csv")
- df4=pd.read_csv(r"D:\Users\abc\cov95.csv")
- ax[0,0].scatter(df1["xy"],df1["yx"],color="black")
- ax[1,0].scatter(df2["xy"],df2["yx"],color="gold")
- ax[1,1].scatter(df3["xy"],df3["yx"],color="blue")
- ax[2,1].scatter(df4["xy"],df4["yx"],color="maroon")
- ax[0,1].axis("off")
- ax[2,0].axis("off")
- xticks=np.linspace(60,100,3)
- yticks=np.linspace(25,100,4)
- ###the reason of using linspace is we can easily set the range, for xticks we want 60 80 100 , so range from 80 to 100 and 3 numbers###
- ax[0,0].set_xticks(xticks)
- ax[0,0].set_yticks(yticks)
- ax[1,0].set_xticks(xticks)
- ax[1,0].set_yticks(yticks)
- ax[1,1].set_xticks(xticks)
- ax[1,1].set_yticks(yticks)
- ax[2,1].set_xticks(xticks)
- ax[2,1].set_yticks(yticks)
- ###comment this out and see what happened to yaxis###
- yticks1= ax[0,0].yaxis.get_major_ticks()
- yticks1[0].label.set_visible(False)
- yticks2= ax[1,0].yaxis.get_major_ticks()
- yticks2[0].label.set_visible(False)
- yticks3= ax[1,1].yaxis.get_major_ticks()
- yticks3[0].label.set_visible(False)
- yticks4= ax[2,1].yaxis.get_major_ticks()
- yticks4[0].label.set_visible(False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement