Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- import matplotlib.pyplot as plt
- from matplotlib.figure import Figure
- # sample file
- #F1,F2,F3
- #4.527,-1.082,-2.776
- #4.599,-1.132,-2.858
- #-1.015,0.557,0.120
- #2.352,0.066,0.059
- op = pd.read_csv("observation_points.csv")
- of1 = op['F1'].values
- of2 = op['F2'].values
- of3 = op['F3'].values
- # sample file
- #F1,F2,F3
- #-0.140,0.499,-0.658
- #0.729,-0.082,-0.543
- #0.870,-0.042,-0.035
- vp= pd.read_csv("variable_points.csv")
- vf1 = vp['F1'].values
- vf2 = vp['F2'].values
- vf3 = vp['F3'].values
- fig = plt.figure(figsize = (16,8))
- ax = fig.add_subplot(1, 2, 2)
- ax.scatter( of1, of2, c=colors )
- ax.set_xlabel('F1', fontsize = 15)
- ax.set_ylabel('F2', fontsize = 15)
- ax.grid()
- ax2 = fig.add_subplot(1, 2, 1)
- ax2.scatter( vf1, vf2 )
- ax = plt.axes()
- for i in range(len(vp.index)):
- px = vf1[ i ]
- py = vf2[ i ]
- ax.arrow(0, 0, px, py, head_width=0, head_length=0.1, length_includes_head=True)
- circle = plt.Circle((0, 0), 1, facecolor='none', edgecolor='b')
- ax2.add_artist(circle)
- ax2.set_xlabel('F1', fontsize = 15)
- ax2.set_ylabel('F2', fontsize = 15)
- ax2.grid()
Add Comment
Please, Sign In to add comment