| Author |
Topic  |
|
|
Timmi_N
Germany
Posts |
Posted - 12/09/2004 : 2:03:05 PM
|
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
|
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?
|
 |
|
|
Mike Buess
USA
3037 Posts |
Posted - 12/09/2004 : 3:46:59 PM
|
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 |
 |
|
|
Timmi_N
Germany
Posts |
Posted - 12/13/2004 : 12:10:42 PM
|
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...
|
 |
|
|
Mike Buess
USA
3037 Posts |
Posted - 12/13/2004 : 3:01:53 PM
|
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 |
 |
|
|
Timmi_N
Germany
Posts |
Posted - 12/14/2004 : 02:43:47 AM
|
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 ?
|
 |
|
|
Mike Buess
USA
3037 Posts |
Posted - 12/14/2004 : 07:37:08 AM
|
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 |
 |
|
| |
Topic  |
|