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
 Origin Forum
 Modify the label values in a contour graph scale

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
Carcassonne Posted - 11/19/2012 : 1:21:55 PM
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!
10   L A T E S T    R E P L I E S    (Newest First)
Carcassonne Posted - 12/05/2012 : 05:49:45 AM
Thank you very much to everyone for your help!

I hope in the next release of Origin this will become less cumbersome though..
Carcassonne Posted - 12/05/2012 : 05:47:17 AM
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

Echo_Chu Posted - 11/29/2012 : 05:33:21 AM
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
snowli Posted - 11/28/2012 : 11:34:01 AM
Dear Carcassonne,

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

And set target to 9.1.

Thanks, Snow
OriginLab Corp.
Carcassonne Posted - 11/28/2012 : 07:01:27 AM
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
Echo_Chu Posted - 11/28/2012 : 06:34:34 AM
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
Carcassonne Posted - 11/28/2012 : 04:58:21 AM
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
Hideo Fujii Posted - 11/27/2012 : 09:32:34 AM
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
Carcassonne Posted - 11/27/2012 : 08:21:42 AM
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
Hideo Fujii Posted - 11/20/2012 : 12:31:06 PM
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

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