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
 Legend line width

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
Slapgravel Posted - 10/14/2015 : 04:49:49 AM
Origin Ver. 2015
Operating System: Win 7

I have some line graphs where there are many datasets on top of each other as it demonstrates the gradient of an increase of power to a system. I have used one of the colour pallets for the gradient and it looks great. However, due to how closely these lines are stacked, I have to keep the lines at 0.5 pt. The issue is that, in the legend the lines are so thin (mimicking the graph) that the colours are imperceptible when viewed on a screen at the front of the lecture theatre. Thus, I would like to thicken the lines in the legend without affecting the lines in the graph. I would like to do this without having to manually input the colours myself, as they are a stretched gradient across all lines. Thus:

/l(l x,x,x)

will not work. The legend is currently in the form of:

/l(1)
/l(2)
/l(3)
...
/l(20)

Which distributes the colours accordingly but appears to give me no control of thickness.

For what I would assume to be something that should be easy, origin apparently make it hard to find these answers.

Any help would be appreciated,

S
4   L A T E S T    R E P L I E S    (Newest First)
snowli Posted - 10/28/2015 : 2:59:05 PM
In this case, you have to manually generate the line in legend.

If you right click legend box and choose Properties...

You can see the entries of each legend row.

\L(L Color,Thickness,Style) can be used to manually create line
see this page
http://www.originlab.com/doc/Origin-Help/Legend-ManualControl#Object_Properties_Dialog

Use Independent Symbols section

If you used some line colors not in basic color list,
You have to get the color value of your plot
One way is from Data menu, pick each plot to be active plot and then run
get %c -c nColor;
ncolor=;

put the ncolor in color part of the syntax.

Right now there is no scaling factor of line thickness or width in legend. We will try to implement some scaling factor for them.

For scatter or line+scaller plot, we do have scaling factor.
E.g.
change \l(1,s:p100) - will scale the 1st plot's symbol size in legend but will not change its shape or color.



Thanks, Snow
Zenbeggar Posted - 10/28/2015 : 11:51:54 AM
Origin Version 8.6
OS Win 7

I have kind of the same problem, but a problem with grouped lines.
In my plot are 3 groups of plots each with a different palette and two single line plots whith individual colour. How do I keep the colours and change the thickness of the lines in legend? It seems that the color code extracted by get -c is wrong. For instance, it should be dark greenish, but is orange instead.

Regards,
Zen
Slapgravel Posted - 10/14/2015 : 06:38:30 AM
Thank you. It worked...I have no idea why but it did.

Is there anyway to do it without learning a scripting language?
Shirley_GZ Posted - 10/14/2015 : 06:10:52 AM
Hi,

Let me show you an example to how to do this using LabTalk script:
1. Import <Origin Installation Directory>\Samples\Graphing\Group.dat inot Origin.
2. Highlight col(B)~col(D) to plot a line graph.
3. With the line graph active, open the Command window by selecting Window: Command Window. Copy and paste the script lines below to Command Window and run it:

string str$="";
int nColor = 0, nn = 1;
%A = %;
doc -e D
{
	get %c -c nColor;
	str$ += "\l(L $(nColor),10) %A($(nn))%(CRLF)"; // Change the legend Line Width to 10 and make the line color follow the plot.
	nn+=1;
}
str$ = str.Trim()$;
Legend.Text$ = str$;


Any problem, please let us know.

Thanks,
Shirley


Originlab Technical Service Team

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