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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 How to set plot symbol = curve number

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
tom3m Posted - 05/30/2002 : 1:11:46 PM
I have a macro that plots pairs of columns and wish to change the symbol types for each curve to be the curve number. For example, if I add plots from worksheet JvsV to a layer as in the following:

loop(ii, 1, ipasses){
lay -i202 %(JvsV, 2*ii);};

In this case voltage columns are V1, V2, ..., and current density columns are J1, J2, ... I would like to also change the plot symbol to be equal to the number ii. I can change to color number ii with no problem using

set JvsV_J$(ii) -cl ii;

and tried using

set BvsV_J$(ii) -k 11;

but this sets the symbols to equal the data point number (symbol for first data point is 1, second data point is 2, ..., Nth data point is N). I figured out how to manually set the symbol to a given character using the plot properties, but I want to do this in a script. Is there a labtalk command to set the symbol for each plot to be the curve number?
9   L A T E S T    R E P L I E S    (Newest First)
tom3m Posted - 06/18/2002 : 3:12:24 PM
It seems Roman's method only works for values of ncurve up to 9. After that you get other symbols (not numbers). It is great to know how to do this, though.

Thank you for the help!
CStorey Posted - 06/13/2002 : 11:18:28 AM
Thanks Roman,

That works! It's a nice undocumented trick. Anyway to avoid the connecting lines?

Craig



Craig Storey
Origin WebRing Member - http://g.webring.com/hub?ring=originwebring
rdremov Posted - 06/12/2002 : 5:06:16 PM
you can easily acomplish this with:
SET %C -ka 49; // 48 + nCurve
labtalk script

Thanks,
Roman.
tom3m Posted - 06/05/2002 : 11:32:11 AM
That is a good idea, but we are plotting 20 traces at a time. After some discussions with various users of the macro in my group, we came up with a way to visualize the data in bands coded first by color and then by symbol type. It turns out visualizing by bands of color provides a better idea of what happens during the experiment than plotting curve trace number.

Cheers!
Laurie Posted - 06/03/2002 : 2:25:06 PM
What about using Plot Details to set the symbol to 1 and then making sure the datasets are grouped so that they increment. This would only be good up to 9 datasets per layer. You could then save the template.

OriginLab Technical Support
tom3m Posted - 05/31/2002 : 2:20:54 PM
Either that, or they could just use something like a "-kn char#" switch to the set command that uses the character number in the set of characters in the Plot/Details dialog. Then there are lots of characters to choose from, and I might use letters for curve numbers >= 10. What I really want is a plot label that is the curve number, though, and that would require a string instead of just a single character.

I tried the 100 plus number of columns to the right method. As far as I can tell, the entries in the column to the right have to be indices into the allowed symbol type numbers used for the "set DataSet -k value" command (value=1 for square, 2 for circle, etc.).

Thanks for all the help. I don't really want to deal with bitmaps, so I think for now I will just use symbols and a legend to decode curve number.
CStorey Posted - 05/31/2002 : 11:29:01 AM
So you want a to label each point in a curve with the curve number? You've found the ways to get incremental numbers and letters, but it appears the it is only possible to get individual alpha or numeric symbols for each dataset is through the Plot/Details Dialog.

Alternately you could try:

A) Creating BMP graphics of 24 letters/numbers and using these.

B) Use "set DatasetName -k value", where value = 100 + number-of-columns-to-the-right. For example, to base the symbol shape on a dataset located two columns to the right of the data plot's Y dataset in the worksheet, use value = 102. (Note: There is a limit of four columns to the right.)

I don't think this would be a tough thing for Origin to add to the labtalk set -k shape# command since there is lots of room between 20 and 56. I'm sure I would find this feature worthwhile.

Craig Storey
Origin WebRing Member - http://g.webring.com/hub?ring=originwebring
tom3m Posted - 05/31/2002 : 08:36:02 AM
That doesn't work. If I use

%A = JvsV_J$(ii);

and then

set %A -k 11;

each curve has symbols 1,2,3,4,5,etc. If I use

set %A -k 12;

each curve has symbols A,B,C,D, (A for data point 1 in the column, B for data point 2 in the column, ...) etc., and if I use

set %A -k 13;

then each curve has symbols a,b,c,d,...

I can use the lower numbers and variations like

set %A -k 1;

to get square symbols. I can also manually set the curve symbol to be a fixed number using the plot details box, but I am writing a macro that plots something like curve tracer data, and there are many curves for one measurement (and multiple measurements to look at - not on the same plot - too messy).
Mike Buess Posted - 05/30/2002 : 4:42:35 PM
Your last expression should work unless the set command is interpreting the dataset name incorrectly. You might try this variation for kicks...

%A=BvsV_J$(ii);
set %A -k ii;

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 05/30/2002 16:44:31

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000