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
 LabTalk Forum
 Plot scatering with open circles
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

coll@inia.

Spain
125 Posts

Posted - 06/03/2014 :  03:58:19 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin prof Ver.8.5 Win7:

I am plotting several columns into an scatter plot by using the scripts shown below:

for(ii=16; ii<=29; ii++)
{
plotxy iy:=[Book1]!wcol(ii) plot:=201;
set %C -k 2; //circle
set %C -kf 2; //open
layer.y.from=0;
layer.y.to=1.5;
}

It works, but only the first column is drawn in open circles !. Furthermore not all the layers shown exactly the same axes.

I also try to select all the columns and plot by using the following script:

worksheet -s 16 1 29 30; // selects rows to be plotted
worksheet -p 201 scatter; //plots selected rows as scatter
layer.y.from=0;
layer.y.to=1.5;
set %C -k 2; //circle
set %C -kf 2; //open

By using this last script the axis are Ok, but again only the first column shows as open circles. I try other combinations whitout any success. It seems like %C is always the same........?

Could anybody help?
Thanks a lot, julio

JacquelineHe

287 Posts

Posted - 06/03/2014 :  07:11:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
HiJulio,

Could you please try to use the following script:

/////////////////
window -a Book1;
plotxy (1,16:29);
set %C -kf 1; //open
set %C -k 2; //circle
layer.y.from=0;
layer.y.to=1.5;
////////////////////

Thanks
Jacqueline
OriginLab
Go to Top of Page

coll@inia.

Spain
125 Posts

Posted - 06/03/2014 :  08:08:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
YES!!! It did work and it was simple.

However every circle was in one different color, is there any way to make them all black?
I try:
set %C -c 1; //black
but it did not work (?)

Thank you Jacqueline !
cheers, julio
Go to Top of Page

greg

USA
1378 Posts

Posted - 06/03/2014 :  08:53:50 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The data gets automatically grouped and Origin then uses the next available color. The set command will not work on grouped data:
// Ungroup the data
layer -gu;
// Set all the colors to black
doc -e DY {set %C -c 1;}
Go to Top of Page

coll@inia.

Spain
125 Posts

Posted - 06/03/2014 :  11:05:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you Jacqueline.

The color can be beautifully changed but after ungrouping, the circles are again converted into squares, except the first one !!!

That was exactly the original problem !!

Can you solved it?
thanks julio
Go to Top of Page

JacquelineHe

287 Posts

Posted - 06/04/2014 :  03:19:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Julio,

I would explain more clearly.
1. %C is the active dataset. So when you use set %C -k 2; , you just can set the active scatter plot to circle, but not all plots in the graph.


2. For the grouped plots, if the increment of Symbol Edge Color/ Symbol Type/ Symbol Interior is set to By One, then set %C is not available to change the plots format.

If the increment of Symbol Edge Color/ Symbol Type/ Symbol Interior is None, then use set %C to custom the first (active) scatter plot, then the grouped plots will change at the same time.

General, color increment of the grouped plots is by one. So Grey suggested you can ungroup the plots.
Then use the loop script to custom all plots format.


3. doc -e object {script}
This loop script could help you to execute the given script for all objects
http://www.originlab.com/doc/LabTalk/ref/Document-cmd#-e_object_.7Bscript.7D.3B_Execute_the_given_script_for_all_objects

/////////////////////
window -a Book1;
plotxy (1,16:29);
layer.y.from=0;
layer.y.to=1.5;
layer -gu; // Ungroup the data
doc -e DY //execute following scripts for all data plots in the active layer
{
set %C -kf 1; //open
set %C -k 2; //circle;
set %C -c 1;// Set all the colors to black
}
//////////////////////////////

Thanks
Jacqueline
Originlab
Go to Top of Page

coll@inia.

Spain
125 Posts

Posted - 06/06/2014 :  3:24:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
OK!!!

I think I got to understand more of the functionning. Thanks.

It also work !!

Thank you for your attention, sincerely, julio

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