T O P I C R E V I E W |
uleucke68131 |
Posted - 01/08/2008 : 08:37:52 AM Hi folks I use version 7.5. I want to create a wafermap out of (random)XYZ data. To create a matrix and just delete the edges of the square does'nt look good enough in a contour plot. I'm looking for a circle like border for the contour plot. Can sombody help? |
3 L A T E S T R E P L I E S (Newest First) |
sipher |
Posted - 01/21/2008 : 12:48:05 PM This is a C code which will do the work:
#include <origin.h>
void mkcircle(double dOutsideVal = -999) { MatrixLayer ml = Project.ActiveLayer(); Matrix mm(ml); int nRows = mm.GetNumRows(); int nCols = mm.GetNumCols(); int nrc = nRows/2.0; // nearest int = 0.5 + nRows/2.0; int ncc = nCols/2.0; double rr = min(nrc, ncc); for(int nr = 0; nr < nRows; nr++) { for(int nc = 0; nc < mm.GetNumCols(); nc++) { double xsqr = (nr - nrc)^2; double ysqr = (nc - ncc)^2; if(sqrt(xsqr + ysqr) > rr) { mm[nr][nc] = dOutsideVal; } } } }
|
greg |
Posted - 01/15/2008 : 11:06:32 AM This script from a sample project in our KBase does what you want: //BEGIN SCRIPT r=abs(layer.y.to-layer.y.from)/2; c=abs(layer.x.to-layer.x.from)/2+layer.x.from; h=abs(layer.y.to-layer.y.from)/2+layer.y.from;
create Circle -wd 200 A B TempA TempB;
circle_A=data(layer.x.to,layer.x.from,(layer.x.from-layer.x.to)/99); circle_b=h+sqrt(r^2-(circle_A-c)^2);
circle_TempA=data(layer.x.from,layer.x.to,(layer.x.to-layer.x.from)/99); circle_Tempb=h-sqrt(r^2-(circle_A-c)^2);
copy -b 1 circle_TempA Circle_A -b 101 -e 200; copy -b 1 circle_TempB Circle_B -b 101 -e 200;
delete circle_TempA; delete circle_TempB;
layer -i circle_B; set circle_b -pf 1; // enable fill area set circle_b -pfv 3; // set fill "exclusive,..." set circle_b -pfb 18; // set fill color to white // END SCRIPT
Have your contour plot active, copy and paste the script to the Script Window (see Window menu), then highlight the entire scriot and press Enter.
|
larry_lan |
Posted - 01/08/2008 : 9:48:40 PM Hi:
Origin 7.5 doesn't support such contour plot. In Origin 8.0, we have made some improvement and you can directly plot a contour from worksheet data, without gridding. This kind of contour graph supports user-defined boundary and cylindrical coordinates. For example:

You can download an demo on our website to evaluate this new feature.
Thanks Larry OriginLab Technical Services |