Commit d0f6d35c authored by Samarth Joshi's avatar Samarth Joshi

Removing pandas from q3

parent a1b27e17
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
import pandas as pd
from pylab import *
import csv
from pylab import colorbar
fig=plt.figure(figsize=(12,12))
ax=plt.axes(projection='3d')
x_points, y_points, z_points = np.genfromtxt('csv_file', delimiter=',', unpack=True)
"""
x_axis=pd.read_csv("csv_file",names=['x','y','z'],usecols=['x'])
x_points=x_axis.to_numpy()
y_axis=pd.read_csv("csv_file",names=['x','y','z'],usecols=['y'])
y_points=y_axis.to_numpy()
z_axis=pd.read_csv("csv_file",names=['x','y','z'],usecols=['z'])
z_points=z_axis.to_numpy()
x_points=x_axis.to_numpy()
y_points=y_axis.to_numpy()
z_points=z_axis.to_numpy()"""
graph=ax.scatter3D(x_points, y_points, z_points, c=z_points, cmap='coolwarm')
colorbar(graph,shrink=0.5)
ax.set_xlabel('X axis', fontweight='bold')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment