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
 Colour of 3D surfaces
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

grahamc

Lancaster, England
22 Posts

Posted - 01/21/1999 :  1:06:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I'm trying to plot 3D data from a script, and can't figure out how to make the surfaces come up filled in white- every time I try, the fill is set to red. Obviously I can set it to white by hand after the script plots each graph, but that rather defeats the object of automation!

I've tried changing the colour of the surface, then saving the modified window as a template. When it's reloaded, the fill has reverted to red. I've tried changing the settings on the fundamental 3d.otp and mesh.otp templates, by loading them, putting data in, changing the colour and saving. Again, when they're reloaded and new data is put back in, they're red again.

I don't see anything in the object reference that lets me at this, either. I know there's a solution, because I asked a long time ago- unfortunately I've lost the reply!

greg

USA
1379 Posts

Posted - 01/25/1999 :  7:09:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
With the Matrix window active, the correct LabTalkTM script to plot using a custom 3D surface Template is:

worksheet -p 242 TemplateName



See pages 191 and 192 in the Origin 5.0 LabTalkTM Manual.
Go to Top of Page

grahamc

Lancaster, England
22 Posts

Posted - 01/26/1999 :  5:43:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
My problem is that the 3D surface comes up filled in *red* and I can't change that fill colour.

I'm successfully using a similar command to the one you suggest in my script, to put data into pre-generated templates. The surface plots fine, but in the wrong colour, and that seems to be un-definable.

I've looked at the pages you specify, but nothing about fill colour is there.

Go to Top of Page

grahamc

Lancaster, England
22 Posts

Posted - 01/27/1999 :  7:30:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Now I see- your command works properly, mine doesn't because I'm manually loading the template first, then selecting the layer, then using "layer -i242 " to plot the data into the graph.

Unfortunately the reason I'm doing it this way round is because I'm using predefined templates with multiple layers, and rendering data into several different graphs. It appears your solution only allows me to plot one dataset/matrix per template. How can I specify the colour to render the graph in when using the layer -i command? Or, alternatively, how can I use worksheet -p to plot into the second layer of an already opened template?

Go to Top of Page

greg

USA
1379 Posts

Posted - 01/27/1999 :  7:45:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply

  1. Plot any matrix as any of the 3D plot types: Fill Surface, Wire Surface, Wire Frame or Colormap Surface.
  2. Make any changes you like
  3. Select File:Save Template As... from the menu (Save as MY3D.OTP for example)

You can now use this template to avoid the exact problem you are seeing by use of this command:

worksheet -p 242 MY3D
Go to Top of Page

greg

USA
1379 Posts

Posted - 01/29/1999 :  7:03:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If you are using multi-layer graphs you can employ another method to add data to the layers, but you still need to create a template using the plot styles you require. You could do this by creating separate graphs and then using Edit:Merge All Graph Windows or by adding pre-defined templates on-the-fly and then calling Edit:Arrange All Layers. Since the first method is well documented, I will illustrate the second:


// First create a Graph window based on one of your pre-defined templates
window -t plot MyTemplate1 MyWinName;
// Now add some data
layer.include(matrix1, 242);
// The above method doesn't auto-rescale so..,
layer -a;
// Add another layer, based on another (or the same) template
page -l MyTemplate2;
// The new layer is now the active layer
// Now add the data
layer.include(matrix2, 242);
// And again, rescale
layer -a;
// Repeat the previous three commands as needed
// Now arrange the layers
run.section(graph,ArrangeAllLayers);

To remove all user interaction, you could write a script to arrange the layers the way you want. Look at the code in the ArrangeAllLayers section of GRAPH.OGS to see how we do that.

[This message has been edited by Greg (edited 01-29-99).]

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