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
 Create Floating Graph in Script After Import

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
cdrozdowski111 Posted - 11/17/2012 : 10:26:28 PM
OriginPro Student 9.0.0, Win 7-64bit (running under WMware Fusion 5.0.2)

Using a "Script After Import" in an import filter, I'd like to create a graph and then add it to the worksheet containing the imported data (I'm using a workbook template). I have the graph creation code working (see below) but need help with the code to add the graph to the worksheet.

plotxy (4,5) plot:=200 ogl:=[<new template:=MyTemplate name:=MyGraphName>] legend:=0 rescale:=1 hide:=1;

Any thoughts?
3   L A T E S T    R E P L I E S    (Newest First)
cdrozdowski111 Posted - 11/21/2012 : 5:03:32 PM
Thanks Greg, you're a doll!

I'll play with it and post a detailed example so that others might find it and be helped.
greg Posted - 11/21/2012 : 12:00:21 PM
For 9.0 users who want the new floating graph there is a new function:

string MyGraph;
insert_graph_to_layer igname:=Graph2 ogname:=MyGraph; // NEW

The worksheet on which you want the floating graph should be active when the command executes.

You can use this code to (approximately!) position the graph to the right of the last column:
%(MyGraph$).x=bmp.dx/2+wks.ncols;
%(MyGraph$).y=-bmp.dy/2;
Drbobshepherd Posted - 11/19/2012 : 11:06:47 AM
cdrozdowski111,

Use insertgraph to embed your graph into a cell in the worksheet. You may need to add a column first. Also, before creating the graph, I suggest saving the workbook and worksheet names because you may need them to address the cell.

Good luck.

DrBobShepherd

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