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
 Changing symbol size of curves on many graphs
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

DrMorbid

United Kingdom
14 Posts

Posted - 08/26/2014 :  2:18:15 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

is there any way, either manual or via Labtalk, to quickly change the symbol size (and line width) on all curves on a single graph? The problem is I have written a Labtalk script that generates e.g. 10+ graphs for me, but graph themes somehow do not change the linewidth and symbol size on the curves. The curves are all inside a single layer on each graph. Thank you for helping me!

Edited by - DrMorbid on 08/26/2014 2:18:40 PM

lkb0221

China
497 Posts

Posted - 08/26/2014 :  2:55:13 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can use a doc -e LP {doc -e DY {}} loop to go through all graph plots to set the line width and symbol size.

Zheng
OriginLab
Go to Top of Page

DrMorbid

United Kingdom
14 Posts

Posted - 08/27/2014 :  5:58:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you very much, this worked!

Could I also put inside this loop a command to make the line colour and symbol colour and also the symbol type to vary from curve to curve? Apologies for these simple questions, I'm a beginner, but have made much progress in recent days.
Go to Top of Page

lkb0221

China
497 Posts

Posted - 08/28/2014 :  12:23:27 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can read the window name, layer index and dataset name that been plotted like the following:

doc -e LP {
  string WindowName = %H; // Get current processed graph window short name
  int LayerIndex = page.active; // Get current layer index number
  doc -e DY{
    string DataPlotName = %C; // Get current dataset name
    ...
  }
}

Then you can use conditions like if or switch to customize the curve base on the infos you got.
If you just want color and type to be different in each layer, you can use the following script:

doc -e LP{
  layer -g; // group all plots in the layer, increment will be applied automatically
}

Or:

doc -e LP{
  int Count = 2; // Begin at 2 because color#1 is black
  doc -e DY{
    set %C -c $(Count); // Set color
    set %C -k $(Count-1); // Set symbol shape
    Count++;
  }
}

Hope this would help.

Zheng
OriginLab

Edited by - lkb0221 on 08/28/2014 12:26:40 PM
Go to Top of Page

DrMorbid

United Kingdom
14 Posts

Posted - 08/28/2014 :  2:58:12 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you very much Zheng, you are great!
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