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 for Programming
 LabTalk Forum
 ScatterPlot Thickness and Graph Color
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

YiDog21

USA
Posts

Posted - 09/30/2005 :  4:33:55 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 6.0
Operating System: xP

Hi, im trying to add into an existing script just the part to change the thickness of a scatterplot from 9 to 3, and changing the color of the data plotted through a line plot on layer.Y2 of an arbitrary graph. Is there a command or object referrence that could do these simple things?

Mike Buess

USA
3037 Posts

Posted - 09/30/2005 :  5:01:28 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Use the set command...

set name -z 3; // set symbol size to 3 points
set name -c 2; // set line & symbol color: 1=black, 2=red, 3=green, etc.
set name -cl 2; // set line color
set name -cse 2; // set symbol edge color
set name -csf 2; // set symbol fill color

name is the name of the dataset you want to change. If the layer has only one curve you can use %C, which always holds the name of the active dataset. Otherwise you can use %(n, @D) to change the nth dataset listed at the bottom of the Data menu.

Not sure what your reference to layer.Y2 means.

Mike Buess
Origin WebRing Member
Go to Top of Page

abreiti

Germany
Posts

Posted - 11/30/2006 :  05:40:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Is there a possibility to change the "borderwidth", too? I hope that's the right translation from the german word "Randbreite".

With "borderwidth" I mean the third parameter, You can change in the dataset-box. The other two are size and color. "borderwidth" is normally on standard.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 11/30/2006 :  9:08:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I can't find a LabTalk control for this parameter but you can do it in OriginC. Add the following function to Codebuilder's workspace as described here and call it from LabTalk like this: SetSymbolEdgeWidth value where value varies from 0 to 255 (default).

void SetSymbolEdgeWidth(int borderWidth = 255)
{
GraphLayer gl = Project.ActiveLayer();
if( !gl ) return;
DataPlot dp = gl.DataPlots(-1); // Active curve
dp.Curve.Symbol.EdgeWidth.nVal = borderWidth; // default width = 255
}

Mike Buess
Origin WebRing Member
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