The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Help with
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bunkytop

USA
7 Posts

Posted - 04/04/2003 :  12:41:28 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I am writing to ask how to make a 3D surface plot from matrix data that uses color in a different way than the standard Plot3D menu options.

Here is the issue: I have matrix of intensities which one can happily plot with "Plot 3D: Color Fill Surface." One can select a color of choice to be used uniformly throughout the resulting surface. But what I would like to do is to plot the surface with a color which depends upon the x axis value of the data. So the surface at any given x value would have the same color, but as one progressed along the surface towards smaller or larger x, the color would change (preferably to colors of my choosing!). Note that this is much, much different than "Plot 3D: Color Map Surface" as with this nice menu option the surface color depends upon the intensity (or magnitude) or the data at a given point, or to put it differently, it depends upon the surface's z value.

What is the easiest way to do a plot where the color depends upon the x axis value? I haven't done any programming/scripting in Origin before, but would be interested in learning if need be.

Thank you.

Christopher

edgar.kaiser

Switzerland
29 Posts

Posted - 04/10/2003 :  03:41:56 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Christofer,

I am not aware of a built in-option to do surface colouring as a function of the independent variables (x, y).
My immediate idea is: Split your MxN matrix into N Mx1 matrices, plot them into the same 3D graph and color them independently.

This is certainly a messy thing to do manually, but if you are willing to learn LabTalk scripting or C-programming it should be easy.

Regards,

Edgar
Go to Top of Page

bunkytop

USA
7 Posts

Posted - 04/10/2003 :  11:19:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Edgar -

That sounds like wise advice. I'll obtain a Labtalk manual and try to learn it, this has always been on my list of things to do.

Christopher
Go to Top of Page

edgar.kaiser

Switzerland
29 Posts

Posted - 04/11/2003 :  03:48:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Christopher,

a possible issue with my suggestion came to my mind: I am not sure if hidden areas of your surface will be diplayed properly this way. You might verify this quickly by just splitting the matrix into two matrices. One of the two should contain hidden areas.

Regards,

Edgar
Go to Top of Page

bunkytop

USA
7 Posts

Posted - 04/14/2003 :  08:14:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello -

It works! I took my matrix, then duplicated it several times, zeroing out regions so that each matrix contained a unique area. Then I plotted all the matrices into one 3D Plot, assigning a different color for each matrix. One basically keeps on adding data sets to the plot with the layer contents option. I have only done this "manually," without using LabTalk, but that is the next step.

However, you must get the order of the data sets correct - some funny bug. The backmost data must be plotted first and the frontmost last. After plotting, one CANNOT change the order of the data sets, even with the layer contents window which supposedly allows you to "raise" or "lower" the order of plotting. Odd.

Thanks, I may have a question when I move on to LabTalk!

Christopher
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000