Author |
Topic |
|
scs_emi
4 Posts |
Posted - 07/07/2016 : 06:03:50 AM
|
Hi
I am new to Origin and I have a question concerning contour plots: In the Script window I execute some commands that plot a Contour Plot which is displayed using "Data Boundary" as Contouring Info. In my script window I now want to change the Contouring Info to "Custom Boundary" How can I do this ?
I used the worksheet -p 243 vector; command to draw the ContourPlot.
Thank you very much
itelly
|
|
Hideo Fujii
USA
1582 Posts |
Posted - 07/07/2016 : 2:39:04 PM
|
Hi itelly,
> I used the worksheet -p 243 vector;
You can specify the template in the worksheet command with a template. For example, here is a snippet. (Let us assume that your data has XYZ data, and you have already saved the clonable template, as you don't have to specify the plot type ID.)
worksheet -a 2; //add 2 extra columns
copydata irng:=[Boundary]!1:2 orng:=[%H]!4:5; //copy boundary data to col 4--5
worksheet -pa ? ContourWithBoundary; I hope this snippet helps.
--Hideo Fujii OriginLab |
|
|
scs_emi
4 Posts |
Posted - 07/08/2016 : 06:20:59 AM
|
Hi Hideo Fujii
thanks for your reply. It really helped !! I can now run my script in the script window perfectly.
But now I have the next problem: Actually I want a FORTRAN program to send these commands to Origin. This is my code:
WRITE(4,1369) 1369 FORMAT(1H ,' win -a Data1; ', 1/1H ,' win -d ContourData;', 1/1H ,' wks.name$ = ContourData;', 1/1H ,' worksheet -a 2; ', 1/1H ,' delete wcol(3); ', 1/1H ,' wks.col3.type = 6; ', 1/1H ,' wks.col4.name$ = BOUNDx; ', 1/1H ,' wks.col5.name$ = BOUNDy; ' , 1/1H ,' window -i;', 1/1H ,' win -a Data2; ' , 1/1H ,' wks.name$ = Bound;', 1/1H ,' colcopy irng:=(1:2) orng:=[ContourData]ContourData!(4:5);', 1/1H ,' win -a ContourData; ' , 1/1H ,' worksheet -s 1 0 3 0; ' , 1/1H ,' worksheet -pa ? ContourPlotWithBoundary_GasVel; ' , 1/1H ,' rescale; ' , 1/1H ,' label -xb blabla [m];')
In this code somehow the command colcopy irng:=(1:2) orng:=[ContourData]ContourData!(4:5); does not work. My data is not copied to the specified colums. They stay empty and as they are used to define the boundaries of my plot the plot is not displayed correctly.
It seems that this kind of command cannot be sent to Origin from FORTRAN.
Is there any solution to that problem?
Thank you itelly |
|
|
Hideo Fujii
USA
1582 Posts |
Posted - 07/08/2016 : 11:33:39 AM
|
Hi itelly,
Not sure what went wrong to run the code via your FORTRAN code. Maybe you can send the command, "echo=7;" to Origin before the body of your code to trace the executed commands, and "echo=0;" at the end to stop tracing?
I hope you get some insights from it.
--Hideo Fujii OriginLab
|
|
|
|
Topic |
|
|
|