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
 Modify the label values in a contour graph scale
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Carcassonne

14 Posts

Posted - 11/19/2012 :  1:21:55 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: Windows 7

Hi,

I made a contour plot with logarithmic scale from 1.0E-5 to 1.0E1.
In the Set Level menu, I put the Num. of Levels = 1000



and in the Color Scale Control the Label Increment is set to 100



The resulting color scale with its corresponding labels is the following:



Could you please tell me how I should modify my settings if I want, for example, to show only the labels in correspondence of
the following numbers:

1.0E1
5.0E0
1.0E0
5.0E-1
1.0E-1
5.0E-2
1.0E-2
5.0E-3
1.0E-3
5.0E-4
1.0E-4
5.0E-5
1.0E-5

Thank you for your help!

Hideo Fujii

USA
1582 Posts

Posted - 11/20/2012 :  12:31:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Carcassonne,

You need to set the number of levels properly to "hit" the exact level values like 1.0E-5, 5.0E-5, 1.0E-4, 5.0E-4,... .
Please see the screenshot of a simple case below. Here, I tried to set 10 levels, but because of "outlier" levels
above maximum and below minimum. The level values appear to the colormap labels. Since your case is log10-scale,
you cannot use the Increment, and the middle points don't fall at 5E-xx positions. It is cumbersome,
but currently you need to change each middle level to 5E-xx manually. I will ask our developers if it is possible to
improve this issue.



--Hideo Fujii
OriginLab
Go to Top of Page

Carcassonne

14 Posts

Posted - 11/27/2012 :  08:21:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by Hideo Fujii


It is cumbersome, but currently you need to change each middle level to 5E-xx manually.



Thank you very much for your help!
Could you please explain what you mean "by changing each middle level manually"?
This method becomes quite complex and time consuming if one has several figures with different scale and number of levels...
Is there any other possibility? Could I use a script perhaps?

Thanks again!

Carcassone
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 11/27/2012 :  09:32:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Carcassone,

You can double-click the level value in the Plot Details dialog, and just modify the value as shown in the screenshot below.
Yes, I know this is cumbersome, and I (or someone?) try to look for a more convenient work-around, if any.



OriginLab
--Hideo Fujii
Go to Top of Page

Carcassonne

14 Posts

Posted - 11/28/2012 :  04:58:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you very much for you prompt reply and help! :)
I'd be very grateful if someone could find a work-around though...

BR,
Carcassonne
Go to Top of Page

Echo_Chu

China
Posts

Posted - 11/28/2012 :  06:34:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, Carcassonne

You can manually change the level by Labtalk scripts.

To do so, please
1. Update the contour graph with From = 1e-5, To=10, Major Levels = 12 first. (As Hideo's post)
2. Select Window: Script Window to open the Script Window
3 .Copy and paste the script below to the script window. Select all lines and press enter.

y=5;
for(ii = 12; ii >= 1; ii--)
{
layer.cmap.z$(ii)=y;
	if (mod(ii,2))
		t=2;
	else
		t=5;
	y=y/t;
};

Let me know whether this works for you

Echo
Go to Top of Page

Carcassonne

14 Posts

Posted - 11/28/2012 :  07:01:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Echo,

thank you. I tried to use your script. If I'm not wrong, it works in the simple case of 12 levels. Is that right?
For example, If I have a Log-scale with Min=10^-5 and Max=10^4 with 256 levels (gray scale), it doesn't work to apply a similar script (with ii=256). Am I wrong?

Carcassonne
Go to Top of Page

snowli

USA
1380 Posts

Posted - 11/28/2012 :  11:34:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Carcassonne,

I jiraed this issue http://originlab.jira.com/browse/ORG-7566

And set target to 9.1.

Thanks, Snow
OriginLab Corp.
Go to Top of Page

Echo_Chu

China
Posts

Posted - 11/29/2012 :  05:33:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, Carcassonne

But if you want to have a series of value as in your first post and with min=10^-5, max=10^4. It is impossiable to be 256 levels. It should be 18 levels.

Please try the code below. You can feel free to change the minlevel and numlevels as you want. Please note that if you set the numlevels as 256, the max level is 1e123 instead of 1e4


minlevel =1e-5;
numlevels = 18;
int jj = 1;
//The loop below is to reset the color level so that we can add desired levels in the next step.
for(ii =  numlevels; ii >= 1; ii--)
{
	layer.cmap.z$(ii) = 10000 - jj;
	jj++;
}

//
y=minlevel;
for(ii = 1; ii <= numlevels; ii++)
{
layer.cmap.z$(ii)=y;
	if (mod(ii,2))
		t=5;
	else
		t=2;
	y=y*t;

};


Echo
Go to Top of Page

Carcassonne

14 Posts

Posted - 12/05/2012 :  05:47:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by Echo_Chu

Hi, Carcassonne

But if you want to have a series of value as in your first post and with min=10^-5, max=10^4. It is impossiable to be 256 levels. It should be 18 levels.

Please try the code below. You can feel free to change the minlevel and numlevels as you want. Please note that if you set the numlevels as 256, the max level is 1e123 instead of 1e4


minlevel =1e-5;
numlevels = 18;
int jj = 1;
//The loop below is to reset the color level so that we can add desired levels in the next step.
for(ii =  numlevels; ii >= 1; ii--)
{
	layer.cmap.z$(ii) = 10000 - jj;
	jj++;
}

//
y=minlevel;
for(ii = 1; ii <= numlevels; ii++)
{
layer.cmap.z$(ii)=y;
	if (mod(ii,2))
		t=5;
	else
		t=2;
	y=y*t;

};


Echo

Go to Top of Page

Carcassonne

14 Posts

Posted - 12/05/2012 :  05:49:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you very much to everyone for your help!

I hope in the next release of Origin this will become less cumbersome though..
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