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
 Origin doesn't draw coloured lines
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Timmi_N

Germany
Posts

Posted - 12/09/2004 :  2:03:05 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System: Windows on i386

I like this forum, which deletes every post before sending it, if there was an error. Is "Postdata keeping" so difficult?


Dear users of the forum,

I'd like to draw coloured lines within a graph using the following script command:

draw -lm -w 2 -v [position]

The switch "-c 2" or "-c [number]" doesn't work. The lines are always as black as my data points. Graph windows is in "Print" mode, but changing this doesn't help.


What could be the reason?


Moreover, I experimented a little bit with the naming of the lines. What is allowed for name, is it possible to name a line like follows:

MgO(200)

I apprechiate very much your tipps!

Timmi_N

Germany
Posts

Posted - 12/09/2004 :  2:11:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I'm sorry, I have to add:

I can't colourise the line, I can't see it in "Pint Preview" and now I can't delete it anymore, either.


What's going wrong?
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 12/09/2004 :  3:46:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Don't know what's going on with that line but it's best to name the line and use its object properties to control it...

%A=MgO(200); // this seems to work
draw -n %A -l -v [position];
%A.color = 2;
%A.linewidth = 2;
- etc -

See Object Reference->Internal Objects Overview->User-created Visual Objects in the manual.

...Your suggested name doesn't seem to work that well after all. Should probably avoid the parentheses.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 12/09/2004 3:55:40 PM
Go to Top of Page

Timmi_N

Germany
Posts

Posted - 12/13/2004 :  12:10:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Sorry,


naming the line seems not to work at all in that way in Origin 7 or 7.5. Are there any alternatives? I know people naming their lines, what's wrong with mine...?


Would be pleased for an answer...
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 12/13/2004 :  3:01:53 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The naming method has worked the same since at least Origin 5. Try this...

%A=vLine;
draw -n %A -l -v [position];

Then right-click on the line and select Label Control. The name vLine will appear in the Object Name box at the top. As I said above there are restrictions on the object name. While you can name your line MgO(200) most object properties/methods won't work with such a name. For example,

%A.color=2;
%A.linewidth=2;

Both of those commands will work for %A=vLine but not for %A=MgO(200).

...%A=MgO200 works fine. Avoid '(', ')' and any other special character.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 12/13/2004 3:02:49 PM

Edited by - Mike Buess on 12/13/2004 3:41:54 PM
Go to Top of Page

Timmi_N

Germany
Posts

Posted - 12/14/2004 :  02:43:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Mike,

I thank you so much for your help; probably I didn't describe well, what is needed:

I need just a visible "label" at the top of the line. It doesn' matter, whether the object is named or not.
In detail, I have lot's of x-ray scattering data. In each graph, I need an automatic method to name the peaks, which appear always at the same x-value (that's the so-called "theta" angle). That would allow me, to identify the peaks I expect in my material *at once*,and, at the same time, so see, which peaks do not belong to my material but are unwwanted impurities.

So far, I didn't find any method to put some text above the line - but I think to imagine a former collegue working with an earlier version of origin did.

Thanks again so far, I will give it another try. Probably someone yould find out why such a method is not obviously accessible in actual versions of Origin ?
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 12/14/2004 :  07:37:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Yes, that's completely different. The name I was talking about was only for control purposes and would normally be invisible. This will draw a line and label it with a normal text label...

ii = [peak number];
xx = [peak position];
%A = [peak label text]; // e.g., %A = "MgO(200)";

// draw the line
%L = ll$(ii); // name of line
draw -n %L -l -v xx;
%L.color = 2; // red
%L.linewidth = 2;

// create the text label
%T = tt$(ii); // name of text label
label -s -n %T %A;
%T.fsize = 16; // font size
%T.color = 2; // red

// position the text label (%T.x and %T.y are the coordinates at its center)
%T.x = xx; // move to line
%T.y = y2 + %T.dy/2; // move above line

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 12/14/2004 08:21:49 AM
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