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
 Origin Forum
 Draw vertical lines to identify spectrum peaks

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
rdelvill Posted - 03/14/2012 : 12:01:05 PM
I have a X-ray emission spectrum (counts in function of wavelength) and I would like to identify the peaks I obtain. To do this I would like to plot a set of vertical lines at the position where the tabuled X-ray emission lines of my elements are supposed to be. Basically, I want to plot on top of my graph something like:

x= 2.3;
x= 2.8;
X= 3.1;
... etc

I found a post at the following address
http://www.originlab.com/www/support/resultstech.aspx?ID=165&language=English&Version=All
but the script is not working when I just type it in the script window and press enter

Could somebody help?

Thank you
5   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 03/27/2015 : 5:34:24 PM
Recent versions have a tool from "Graph: Add Straight Line" menu to do such job, so you don't have to reply on the script command.
Regarding the control of putting the line object in front or behind of the plot, you can press "Front(data)" or "Back(data)" button in the Object Edit toolbar, accordingly.

--Hideo Fujii
OriginLab
DVC Posted - 03/26/2015 : 9:59:59 PM
This is almost exactly what I need. However I need to be able to put the vertical lines behind the spectrum.

If I put the line assignments in front of the spectrum it obscures the emission lines themselves.

How do I put the vertical lines behind the spectrum? (Ver 6.1)
Hideo Fujii Posted - 03/15/2012 : 6:57:40 PM
Hi rdelvill,

If you need a bunch of vertical lines, you can define and use a macro such as:

define vv {draw -l -v %1};
vv 15;
vv 16;
vv 17;

You can highlight lines you want to run, and press ENTER key. (By this way, you put semicolon at each command line.)

For the text label, if you want beyond to put your own text label manually, for example, you can put a script for the line object such as below. This script makes a label on top of the line for the X position when the line is clicked by mouse. (Open this dialog by
ALT+double-click, or right-click and choose Programming Control flyout.)



--Hideo Fujii
OriginLab
rdelvill Posted - 03/15/2012 : 04:07:05 AM
It works indeed by omitting the coma.
Now I can display one vertical line but what would be the best way to display together a set of lines and not just one? In addition I would like a add a tag (small text) to each line in order to identify them.

Thanks
Hideo Fujii Posted - 03/14/2012 : 2:08:53 PM
Hi rdelvill,

I have tried the command like:
  draw -n vline -l -v 5
in Script window followed by pressing ENTER in my Origin 8.6, and it worked. 

Probably you put a semicolon(;) at the end of line in Script window, then press ENTER. 
Semicolon is OK to be placed to separate multiple commands in a single line, 
or when commands are in a script file (*.ogs); but if you enter a single command, 
you cannot put a semicolon at the end of the line. 

Hope this is the case.

--Hideo Fujii
OriginLab

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