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
 Origin Forum
 center a plot on the page?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mwarner

USA
30 Posts

Posted - 01/05/2006 :  10:04:28 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System:Win 2000

More pre-press issues: Is there any way to quickly get your plot directly centered on a standard 8.5 x 11 inch page? I typically set the plot dimensions in inches under the layer properties to meet journal column requirements, but would love to see a simple "center on page" function one could use. Adjusting the % page dimensions under the arrange layer dialogs seems quite confusing to me for this purpose. Also, is there any ruler function in Origin where one can have horizontal and vertical rulers on the screen while working with plots? Thanks for any advice,

Mark

Mike Buess

USA
3037 Posts

Posted - 01/05/2006 :  11:35:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mark,

The following script will center the active layer frame. You can run it from a custom toolbar button or assign it to the Custom Routine button as described here...
http://www.originlab.com/www/support/resultstech.aspx?language=english&ID=655

lusave=layer.unit;
layer.unit=1; // layer unit=percent of page
layer.left=(100-layer.width)/2; // center horizontally
layer.top=(100-layer.height)/2; // center vertically
layer.unit=lusave;
del -v lusave;

...Origin has no ruler function but you might find View > Show > Object Grid or Layer Grid useful.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 01/05/2006 11:57:36 AM
Go to Top of Page

mwarner

USA
30 Posts

Posted - 01/05/2006 :  1:25:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Mike, (once again). Now, what if I have two plots set up that are different layers, but I want to group them and then apply the same centering script? Is there a way to merge layers into one layer? I tried the edit->merge all graph windows, but this does not seem to do the trick. Or does the script need tweaking so that it can run the centering on all layers?

Mark
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 01/05/2006 :  1:43:04 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mark,

This will center all layers in the active graph window...

doc -e LW {
lusave=layer.unit;
layer.unit=1; // layer unit=percent of page
layer.left=(100-layer.width)/2; // center horizontally
layer.top=(100-layer.height)/2; // center vertically
layer.unit=lusave;
};
del -v lusave;

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 01/05/2006 1:44:34 PM
Go to Top of Page

mwarner

USA
30 Posts

Posted - 01/05/2006 :  2:45:03 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Mike,
Looks like your last script places my two layers on top of each other.

Mark
Go to Top of Page

easwar

USA
1964 Posts

Posted - 01/05/2006 :  2:53:36 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mark,

Note that you can access properties of each layer the way Mike illustrated, so you could independently address each layer and place it as desired. For example you may need to decide how much space to allocate between the two layers, if you are placing them side by side etc. Perhaps posting a picture of your graph will help. You can upload images to the forum.

One thing I wanted to point out is that once you have the layers positioned the way you want them, you may want to consider saving the configuration as a template for future use so that you need not do this aligning repeatedly. Also in 7.5 there is a Theme feature which can be used to save layer size and positioning info (and only this info in the theme) so that the theme can be applied to similar graphs in future etc.

Easwar
OriginLab

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 01/05/2006 :  3:05:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Looks like your last script places my two layers on top of each other.
Yes, that's what I thought you wanted. Perhaps it would be best to post an image of your graph as Easwar suggested. However, as Easwar also suggested, complicated multi-layer graphs are best handled with templates and themes.

...You might also try another File Exchange addon...
http://www.originlab.com/FileExchange/details.aspx?fid=54

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 01/05/2006 3:16:43 PM
Go to Top of Page

mwarner

USA
30 Posts

Posted - 01/06/2006 :  09:27:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ok, I will post images and suggestions in a bit, as I think there are a lot of Origin users out there trying to tackle similar issues and get their work done as quickly as possible. Mike, how does one implement the contents of your last link. It looks like the file was unpacked once I opened it, but I'm not sure how it is implemented in the program. Is this strictly a command line drivien tool?

Mark
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 01/06/2006 :  10:15:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The download is an Origin C file...

1. Move or copy LayerTools.c to your OriginC folder.
2. Open CodeBuilder View > CodeBuilder.
3. Right-click on the System folder of Origin C Workspace and select Add Files. Select LayerTools.c and click Open to add to workspace.
4. Select Tools > Build to compile.

It does work from command line and instructions are at the top of LayerTools.c. I haven't actually used it but looks like it could be useful for your purposes.

Mike Buess
Origin WebRing Member
Go to Top of Page

mwarner

USA
30 Posts

Posted - 01/06/2006 :  10:29:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ok, Here is one example:

The final image is a two pane graph. I'm starting from two individual plots then merging them and then working on the layers to get them where I want them on the page. So, running either script listed above will dump the panes on top of each other, which is of course not what I want.

easwar's suggestion of using themes is a good one and speeds things up a bit for me for sure, but this feature still needs better implimentation in Origin. A good example is how when one constructs multi-pane graphs at the end like this, one usually must mannualy add the appropriate text for axis labels and get them aligned to look right (e.g. the y axis label needs to sit between my two layers in this image). This formatting is not saved as part of a theme, so I still have to re-do it with each run of the theme. Things get uglier with more complicated multi-pane images.

I think Origin needs much more intuitive "end of the line" editing capacity that is gui-enabled in this regard. For my posted example, many of these issues are moot if one sets up a two pane template, and this is great if one starts out by setting up things exactly like they need them from the get-go. In the world of publishing this is rarely the case, as an editor may tell you to reduce/enlarge an entire plot or only some element of an image.

It would be nice to have more wysiwyg editing capacity and better way to ensure that everything is linked in an image and to quickly group all elements that I see on a page. For the image posted, it appears that somehow my y-axis label, the "day night" labels and boxes on the top and the top pane legend are all linked and I can move them by accident when trying to move the layers. To me, this screams for a function where I can simply hit a "select all" key, goup everything on the page to hold the aspect ratios and then hit a "center on the page" key, and I would be done.

Edited by - mwarner on 01/06/2006 10:43:14 AM
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 01/06/2006 :  10:59:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Mark, I suspect that your image did not show up because you didn't see the "Click to insert code..." link which is cleverly hidden at the bottom of the upload dialog. (You need to scroll down to find it.)

I use layout pages to combine multiple graphs in one figure. The Object Edit toolbar treats each graph as a single object which can be aligned and sized wrt to other graph's in the layout. To achieve a common format for all graphs you can Copy/Paste formats between the graphs themselves. Once they are positioned relative to each other they can be grouped from the Object Edit toolbar and the group can be centered w/page from the AlignObject toolbar.

Mike Buess
Origin WebRing Member
Go to Top of Page

mwarner

USA
30 Posts

Posted - 01/06/2006 :  2:54:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ok, so for layout pages, how can I get the exact same size plot in the layout that I have created originally? The size dimensions in the layout object editor do not correspond to the same dimensions I set when working with layer settings in the origianl plot. The object dimensions seem to correspond to the entire frame around the plot. I really hope this is improved in the next version.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 01/06/2006 :  4:03:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
To get the same size plot you would need to set the dimensions of its image on the layout to the original graph page size (e.g., 8x10.5 inches or vice versa). Instead, I usually size all graph layers to fill their graph page as shown below and then adjust the image sizes to fit in the layout page.

Graph window (one of six):


Layout page (screen shot of Print Preview):


Mike Buess
Origin WebRing Member
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