On Dec 9, 11:05 am, Jason Grout <jason-s...@creativetrax.com> wrote: > Eugene Goldberg wrote: > > Hello, > > > Could you please advice the way to plot three-dimensional array? > > Something like plot3d or counter_plot, but in case the data are > > already calculated in array and there is no way to call f(x,y). > > Can you give an explicit example of input and what it should look like? > > One way to do it is, if your array is A, then plot lambda x,y: A[x,y] > (in other words, make a function that just returns the precalculated value) > > Here is another example of a different interpretationn of your request: > > data=[[[math.sin(x^2)*y+math.cos(z) for z in [-5..5]] for y in [-5..5]] > for x in [-5..5]] > var('x,y,z') > implicit_plot3d(lambda x,y,z: data[int(x)][int(y)][int(z)], > (x,-5,5),(y,-5,5),(z,-5,5),contours=[0])
Another option is list_plot3d, depending on exactly what you want to do. -- John -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org