|
From: Andy M. <and...@gm...> - 2007-06-15 21:50:07
|
Hello, I need a little help with a plot I am trying to produce. It is driving me crazy! I'm keep thinking it is possible, but I'm not completely sure. So I have this particular function I am trying to plot. I generate data in the form (shorthand notation for my own ease): s = 1:10 p = 1:30 [x,y,z] = f(s,p) and I can fill up matricies any way I like to store the results. I want to plot this ribbon is 3d space, I decided I didn't want to be able to distinguish the s part (just leave that as a row), and have p denoted by a change in colour. So this surface twists like a ribbon, starting at red, and finishing blue (or whatever) What I did is create two data files, one for the surface position data in the form: x(s=1,p=1) y(s=1,p=1) z(s=1,p=1) x(s=2,p=1) y(s=2,p=1) z(s=2,p=1) x(s=3,p=1) y(s=3,p=1) z(s=3,p=1) x(s=4,p=1) y(s=4,p=1) z(s=4,p=1) x(s=1,p=2) y(s=1,p=2) z(s=1,p=2) x(s=2,p=2) y(s=2,p=2) z(s=2,p=2) x(s=3,p=2) y(s=3,p=2) z(s=3,p=2) x(s=4,p=2) y(s=4,p=2) z(s=4,p=2) etc and another one the same for the colour data, but with the z column replaced by p I then get extremely stuck trying to plot this using splot with pm3d. Am I fighting a losing battle? Or can someone help? Thanks, Andy. |