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 for Programming
 Forum for Origin C
 Contour Plot Options
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

meluks

4 Posts

Posted - 03/08/2011 :  11:03:02 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release: OriginPro 8G SR1
Operating System: Win XP SP3

Hi,

I'm quite new to Origin and I want to "automate" a plot.
I could manage to load a Excel File and to plot it with a template.
First question:
Now I want to modify the Increment of the x-Axis to 0.25. I tried with
Axis axesX = grphLayer.XAxis;  
axesX.Scale.From.dVal = -1;
axesX.Scale.To.dVal = 1;
axesX.Scale.IncrementBy.dVal = 1/4; 

But only the "From" and "To" values changed in the graph. Not the ticks. Is this the wrong command?
Second question:
I want to change the settings for the levels of the color map of the graph. I want a minimum value of 0.1 and a maximum value of 0.8 and 8 for the number of levels. How can I set this with OriginC?
Third question:
How can I set the first row of the book as long name with OriginC?

Hopefully someone can help me Thanks a lot!

Penn

China
644 Posts

Posted - 03/08/2011 :  10:04:26 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

For the first question:

Two issues:
1. IncrementBy here is not the increment of axis, it is used to specify how to set the increment, if 0 (default value), by specifying the increment value, if 1, by specifying the number of major ticks. When IncrementBy is 0, use Value to set the increment.

2. 1/4 will return zero, if you want 0.25, please use 1.0/4.0.

Sample code can be:

Axis axesX = grphLayer.XAxis;  
//Tree tr;
//tr = axesX.Scale;  // set a break point here to see the tree structure
axesX.Scale.From.dVal = -1;
axesX.Scale.To.dVal = 1;
// axesX.Scale.IncrementBy.dVal = 0;  // default value is 0
axesX.Scale.Value.dVal = 1.0/4.0;


For the second question:

Please refer to Plot XYZ Contour from worksheet and custom lines and Plot Contour from matrix and custom colormap.

For the third question:

You can do that like this: 1. Set the row to the Long Name by SetAsLabel method, and then delete this row by DeleteRow method.

Penn
Go to Top of Page

meluks

4 Posts

Posted - 03/09/2011 :  02:26:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

thanks for your help. It worked!
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