The Origin Forum
File Exchange
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
 Print Dimensions of embedded Graph
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

sebbey

Germany
70 Posts

Posted - 05/11/2012 :  04:48:54 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 8.6.0G
Operating System: Windows 7 Professional

Hello everybody,

I have a question:
How can I change the print dimensions of a graph within a Labtalk script?

I'm trying to embed three different Graphs in a Worksheet (they lie on top of each other).
All of them have different heights, but should have the same width. I dont want to use
the plotstack function, because I need these graphs seperatly.

For your understanding I'll try to illustrate my case:

I embed three graphs in a worksheet.
The Bottom and the top graph have the same layer width and the same layer height. The Graph in the Middle
should only be half as high as the others, but have the same width. I guess the problem is, that the
print dimensions downscale the image in the middle.

#################
#################
## merged cells #
#################
#################

#################
# merged cells #
#################

#################
#################
## merged cells #
#################
#################

I hope you can understand my Problem!
Greets,
sebbey

Kathy_Wang

China
143 Posts

Posted - 05/14/2012 :  02:55:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I'm not quite sure if I understand your question correctly, but it seems to me that you would like to change the graph size with a labtalk script. If so, you may use the "layer" command when the graph window is activated, the syntax is
layer <width height xoffset Yoffset>

An example would be:
layer 40 40 10 10

The unit of the size variables would be your current size unit in the layer.


Kathy
Originlab
Go to Top of Page

Kathy_Wang

China
143 Posts

Posted - 05/14/2012 :  03:09:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
In addition, there is another way that might help. That you choose not to keep aspect ratio of the graph when you insert the graph, by this method, the original size of your graph will not be changed, but the embedded graph size will change according to the cell size (i.e. stretch to the cell).

To do this, you could use the following command to turn off the "Keep Aspect Ratio" when you insert the graph. An example would be:
insertGraph gname:=Graph1 keepAspect:=0;



Kathy
Originlab

Edited by - Kathy_Wang on 05/14/2012 03:10:32 AM
Go to Top of Page

sebbey

Germany
70 Posts

Posted - 05/14/2012 :  04:38:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Kathy,

first of all, thank you for your answer. My Problem is a little bit different. I'll try to explain it in another way.

I create a graph with a labtalk script. After I created the graph I want to embed it in a worksheet. Within this worksheet I merged a couple of cells in which the graph should fit in.
My Problem is that, after embedding, only the top half of the Graph is visible. The bottom half is gone. If I double-click on the Graph to open the Graph window, I can see the bottoom half situated on a grey surface, which means it is outside the printarea/print dimensions. Can I somehow change the size of the grey area with a labtalk script.

Thanks,
sebbey
Go to Top of Page

Kathy_Wang

China
143 Posts

Posted - 05/14/2012 :  05:13:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi again,

For your purpose, I suggest you to try the first option I provided. That you use the "layer" command to change your plot size(i.e. set the layer height to be a smaller value) and make the plot back to the printing area.



Kathy
Originlab
Go to Top of Page

sebbey

Germany
70 Posts

Posted - 05/14/2012 :  09:45:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Kathy,
thanks again, it finally worked out!
Sebbey
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 © 2008 Originlab Corporation Go To Top Of Page
Snitz Forums 2000