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
 Forum for Origin C
 Graph questions

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
nbo10 Posted - 12/16/2005 : 8:23:30 PM
Origin Version (Select Help-->About Origin): 7.5
Operating System:xp

A few quick questions.

1) how do I set the text on the axis labels?
2) how do I make a new legend, change the font size,and change it's position?
3) with export_page_to_image(...) what are the file format options, bmp and what else? eps, wmf???

Thanks
1   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 12/17/2005 : 3:51:07 PM
Hi,

First of all, I would suggest that you look into using graph templates and graph themes which may be easier to work with rather than building graph programmatically from scratch. You can customize a graph and save as template and create instance of it programmatically, or save your desired settings to a template file and applly template programmatically to other graphs.

As for your specific questions:
1) Please see the following page and the example named "Manipulate graph axes" under graphing category
http://www.originlab.com/index.aspx?s=9&lm=71&pid=268

2)The legend is a text object with name "Legend" and properties of this text object can be accessed with code such as:


GraphLayer gly = Project.ActiveLayer();
if( !gly ) return;

// Add/update legend
LT_execute("Legend;");
// Point to legend text object
GraphObject gobjLegend = gly.GraphObjects("Legend");
// Get dimension properties into tree and change
Tree tr;
tr = gobjLegend.Label.Dimension;
out_tree(tr);
tr.Dimension.Left.dVal = 5.5;
gobjLegend.Label.Dimension = tr;
// Can also directly address object properties
gobjLegend.Label.Font.Size.nVal = 28;



3) All formats supported in the GUI are allowed. As to what string constant to use for each format, please look at the export dialog and the Save as Type drop-down. For example to export as a TIFF file, you will use:
export_page_to_image( pg, "c:\\test.tiff", "tif", false);

Easwar
OriginLab




Edited by - easwar on 12/17/2005 3:52:05 PM

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