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
 How to distribute graphs on a layout page?

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
tib Posted - 06/11/2007 : 09:52:27 AM
Hi,
there is the ObjectToolbar for aligning graph objects on a page.

But, is there a way to evenly distribute several marked graphs on a layout?
Of course, you could use the grid, but this is not always helpful.

Thanks for hints,
Tilman.


5   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 06/22/2007 : 08:20:22 AM
Hi Tilman,
quote:
But is there a way to get the name of the linked object?
Is there anything like BMP.name$= or BMP.link$ = Graph1?
Because I want to shift Graph1 and I am not interested whether this is BMP, BMP1 or BMP2.
Actually, this is one area where OC has advantage over LT with graph objects. OC will not get the name of the graph to which the object is linked but it can get the names/properties of existing objects...

Layout gl = Project.ActiveLayer();
foreach (GraphObject go in gl.GraphObjects)
{
out_str(go.GetName());
out_str(go.GetObjectType());
out_double("left=",go.Left);
out_double("top=",go.Top);
// etc.
}

...I guess you can do something similar in LabTalk...

doc -e G { // loop through all objects
%B=; // object name
%B.left=;
%B.top=;
};

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 06/22/2007 08:23:47 AM

Edited by - Mike Buess on 06/22/2007 09:29:04 AM
tib Posted - 06/22/2007 : 03:21:29 AM
Hi Mike,
yes I remember. I wanted to know whether there is anything new. But if you say it is not (even with OriginC)... :-(
I was hoping for something like:
PlaceGraph(LayoutName, GraphName, PosXY, SizeXY);

With the method in the post you mentioned you cannot have a flexible number of graphs in a layout.
The re-and-back-naming method also I used works only for a given number of graphs, i.e. you have to know beforehand how many graphs you are going to place. I do not know how to add or remove graphs with LabTalk.
A workaround might be that you generate different Layout templates with 1,2,3,...20 graphs positioned somehow and somewhere on the layout. Then you open the layout template with the desired number of graphs and do the rename procedure and shift and scale them as you want. The graphs in the layout are stored as BMP, BMP1, BMP2, etc...
You can position them with BMP.top=... BMP.left=... etc.

But is there a way to get the name of the linked object?
Is there anything like BMP.name$= or BMP.link$ = Graph1?
Because I want to shift Graph1 and I am not interested whether this is BMP, BMP1 or BMP2.

thanks,
Tilman.
Mike Buess Posted - 06/21/2007 : 11:03:09 PM
Hi Tilman,

Origin C doesn't have much advantage yet over LabTalk for positioning/sizing graph objects. You might look at the final post in this earlier topic (you posted in that topic as well).

http://www.originlab.com/forum/topic.asp?TOPIC_ID=1640

Mike Buess
Origin WebRing Member
tib Posted - 06/21/2007 : 5:45:43 PM
Hi Larry,

no, I want to "program" where the graphs in a layout are located.
Kind of a template. But a very flexible (interactive) layout.
For example,
Graph1 sits at position x1,y1 and has a size of sx1,sy1
Graph2 sits at position x2,y2 and has a size of sx2,sy2
etc.
..if switch SW1 is selected graph3 sits at pos x3,y3 etc...

Most probably some OriginC routine?
Tilman.

larry_lan Posted - 06/12/2007 : 9:57:57 PM
Adding graphs in Layout page is just like drawing pictures "freehand", so there is no such tools. How about arranging your graph layers on a graph windows and then paste to the Layout page?

Larry
OriginLab Technical Services

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