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
 Modifying legend size or Copy format with Labtalk

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
johannes.kastl Posted - 06/06/2013 : 08:57:36 AM
Hi everyone,

is there a way to use "Copy format" with Labtalk?

I have to adjust the legend of a lot of graphs, especially the size of the outer border. In the graph, by left-clicking on the border, the border can be adjusted and the size can be changed (the minimum size seems to be defined by the text within the legend).

I found no settings anywhere on how much "bigger" (than the text) the legend is. And I found nothing about it in regard to Labtalk.

My only solution at the moment is to copy the dimensions and "paste format" it for each single legend by hand.

Regards,
Johannes


Origin Ver. and Service Release (Select Help-->About Origin): 9.0.0G SR2
Operating System: WinXP
7   L A T E S T    R E P L I E S    (Newest First)
Kathy_Wang Posted - 07/02/2013 : 9:56:32 PM
quote:
Originally posted by johannes.kastl

Thanks Kathy,

thats better than using GObject.

Johannes

BTW: Your links just open 404-error-pages on my machine, but I knew where to look, so I found it anyway.



Thanks for reporting this Johannes.

It seems there was a redirecting error, now the documentation links should be fixed in my previous post.

Sorry for the inconvenience.

Kathy
Originlab
johannes.kastl Posted - 07/01/2013 : 07:16:48 AM
Thanks Kathy,

thats better than using GObject.

Johannes

BTW: Your links just open 404-error-pages on my machine, but I knew where to look, so I found it anyway.
Kathy_Wang Posted - 07/01/2013 : 03:47:56 AM
Hi Johannes,

You may use the page -s command to select the legend object before you copy the dimension.

To get the object name, you may either right click on the legend object, choose Programming Control, or use the list -o command.

Kathy
Originlab
johannes.kastl Posted - 06/27/2013 : 09:21:22 AM
Hi Kathy,

finally got time to try out your answer, and it works.

I figured I can 'select' the legend via
GObject foo = legend;
which is necessary to tell labtalk which formats/dimensions/... to copy (in my case the formats/dimensions/... of the legend). Or is there another way?

Thanks,
Johannes
Kathy_Wang Posted - 06/13/2013 : 10:01:49 PM
Hi,

If you have the Script Window open, and click a menu item while holding the Shift + Ctrl keys, the corresponding LT script (if any) will be returned to the script window, and also the menu id.

This will be helpful to get the script for other similar operations.

Kathy
Originlab
johannes.kastl Posted - 06/13/2013 : 07:50:41 AM
Hi Kathy,

you got it. That was exactly what I was looking for.

Maybe you could add a enhancement request for the next release. It would be nice if there was a dialog where one can choose how mach space is between the text/symbols and the surrounding line. The minimum is different, depending on which plot type (bar, line, symbol) and which legend border (left/right, upper/lower). So it is hard to set it exactly equal without copying the format...

Thanks,
Johannes

BTW: Is there an overview how to get the other 'copy format' commands apart from Dimensions? I had a look into the file.ogs but that is pretty big and confusing, so a nice little overlook would be better to remember...
Kathy_Wang Posted - 06/13/2013 : 05:02:35 AM
Hi,

If I understand correctly, you would like to increase the "gap" between the legend border and legend text, right? Unfortunately there is no LabTalk control for that, you can only manually drag and drop the border box. I am attaching an image to illustrate this control in case someone else is reading this post:



So in order to make your work easier, you may call the corresponding sections in the built-in ogs file for copy format and paste format. For example the sample script below will work the same as you manually right click on Graph 1, choose "Copy Format:Dimensions" and then go to every graph window in the project, right click and choose "Paste Format".


//Activate the window of Graph1
win -a Graph1;
//This is equivalent to right click-Copy Format-Dimensions
run.section(file,FmtsCopyDimensions);
//Execute the script in {} for all graph windows in project
doc -e P
{
//In each loop, active the current graph window.
win -a %H;
//This is equivalent to right click-Paste Format
run.section(file,PasteFormats);
}


Kathy
Originlab

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