Author |
Topic  |
|
sebbey
Germany
70 Posts |
Posted - 05/11/2012 : 04:48:54 AM
|
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
159 Posts |
Posted - 05/14/2012 : 02:55:08 AM
|
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 |
 |
|
Kathy_Wang
China
159 Posts |
Posted - 05/14/2012 : 03:09:38 AM
|
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 |
 |
|
sebbey
Germany
70 Posts |
Posted - 05/14/2012 : 04:38:07 AM
|
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 |
 |
|
Kathy_Wang
China
159 Posts |
Posted - 05/14/2012 : 05:13:01 AM
|
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 |
 |
|
sebbey
Germany
70 Posts |
Posted - 05/14/2012 : 09:45:37 AM
|
Hi Kathy, thanks again, it finally worked out! Sebbey |
 |
|
|
Topic  |
|
|
|