Ask Your Question

load data file to draw surface

asked 2014-10-23 03:56:20 -0500

Avijit gravatar image

updated 2014-10-27 12:48:42 -0500

I have a matrix consisting of 512 rows and 512 columns. I have written this matrix down into a text file. Each cell of the matrix contains a positive value. I want to plot these values in 3 dimensional system to form a surface by uploading the text file. How to do it in sage ?

Thank you

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-10-27 12:47:55 -0500

updated 2014-10-27 12:51:46 -0500


First you have to load the matrix into sage. It really depends on how did you save the values. To open a file you use the function open from Python.

Secondly, given a matrix, I am not sure there is a ready made solution inside Sage. But you might use point3d. I would think that the best solution is to use directly matplotlib (which is what Sage uses in background). You can have a look at these matplotlib examples.


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-10-23 03:56:20 -0500

Seen: 8,695 times

Last updated: Oct 27 '14