-3

I have a text file of a grid that has x y z coordinates (of cell centers and are in UTM) and varying lengths of the sides of the cells(sx, sy and sz). The points are random points. I would like to plot this in Python. Can anyone offer any suggestions?

 x       y          z     sx    sy   sz
 584597 1848923    210   143    53   143      
 584885 1848927    210   143    62   143      
 585173 1853185    210   143   224   143 
halfer
  • 19,824
  • 17
  • 99
  • 186
RB123
  • 1
  • 2
  • Welcome to SO! Please review the following and add the error message you are getting: https://stackoverflow.com/help/how-to-ask – garfbradaz Jul 04 '17 at 20:31

1 Answers1

0

As far as how? I would start by:

1) using readline, you split each by the " "(space) values

2) create dict with a for loop, and setting the key.. x y z etc...

3) ?? You say you want to plot but since I don't know the end game here; I imagine matploit should be the goto forgraphical plotting

4) As to the other variables, the non-coordinantes, it's up to you in how you want to correlate/express these values.

halfer
  • 19,824
  • 17
  • 99
  • 186
scriptso
  • 677
  • 4
  • 14
  • Matplotlib is ok for 2d plots, but since the data is 3d, RB123 might be looking for something different. I can think of 2 things: 1) plot projections on a/some planes in matplotlib, and 2) create a vtkPolyData with, maybe, spheres at the point locations, that can be viewed interactively in e.g. paraview. – mululu Jul 05 '17 at 05:33