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
 Overlay image on 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

peter.cook

UK
356 Posts

Posted - 09/19/2005 :  11:42:13 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5 SR5
Operating System: Win2000

I'd like to overlay an image on a graph via code. The particular example is obtain a molecular structure and then displaying it on top of a dose response curve. Ideall it would be 'merged' rather than overlaid and I guess I would need to be able to control the size / location. Can this be done?

Thanks,

Cheers,

Pete

easwar

USA
1964 Posts

Posted - 09/19/2005 :  1:45:25 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Pete,

You can use the LabTalk image object with code such as:



// Point to image file
image.filename$="c:\\temp\\My Image.jpg"; ;
// Import image into Graph1 and name it MyObject
image.import.object(Graph1,MyObject,0);

// Set properties of MyObject ;
// Default size units is pixels
myobject.height=1000;
myobject.width=2000;
// Default position is in units of layer axes
myobject.x=4;
myobject.y=5;

// Push image to backgroud so data shows on top
select -order data 1;




Easwar
OriginLab

Go to Top of Page

peter.cook

UK
356 Posts

Posted - 09/19/2005 :  4:04:48 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Easwar,

Thanks!

Now all we have to do is read the compound id, retrieve the smiles string from our database, draw the 2D structure and save as an image!

One question - I had to manually select the image before select -order data 1 worked.

Clearly I don't want to do this, so how can I select the object via code? Thanks.

Cheers,

Pete

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 09/19/2005 :  4:17:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Pete,

Use this...

page -s objectName;

Mike Buess
Origin WebRing Member
Go to Top of Page

peter.cook

UK
356 Posts

Posted - 09/19/2005 :  5:45:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike,

Thanks.

Cheers,

Pete

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