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
 Forum for Origin C
 Many questions about 3D plots
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

wilsonthongwk

Hong Kong
Posts

Posted - 05/22/2007 :  12:33:47 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): OriginPro 7.5 SR0 v7.5714(B714)
Operating System: Win XP (SP2)

Following details refer to "3D - Colormap Surface" plot type.

- How to fix the "from" of Z axes? The following solution doesn't work. Double-click the Z axis and go to the "Scale" page. Change "Rescale" to "Fixed From", and set the "From" to whatever I want to. When I press the "Rescale" button or run the GraphLayer::Rescale(), the "From" of the Z axis changes. How can I fix it?

- How to set the "from" of Z axes in Origin C? While GraphLayer.X and GraphLayer.Y exist, there is no GraphLayer.Z. How can I customize Z axes, such as its "from"?

- How to refresh the colormap? Both refresh button and GraphPage::Refresh() don't work.

I use GraphLayer::AddPlot to plot a matrix into a graph template of type "3D - Colormap Surface". Then I use the following codes to change the "Min" and "Max" (i.e. the range) of colormap.

// rdSurfLayer is a GraphLayer
DataPlot rdSurfDP = rdSurfLayer.DataPlots(0);
rdSurfTree = rdSurfDP.Surface;
double rdMMaxValue = rdM.GetMax();
rdSurfTree.ColorMap.Min.dVal = 0.5;
rdSurfTree.ColorMap.Max.dVal = rdMMaxValue;
rdSurfTree.ColorMap.Details.Remove();
rdSurfTree.ColorMap.Count.nVal = 30;
// update the plot
rdSurfDP.Surface = rdSurfTree;
rdSurfLayer.Rescale();
// rdPlot is a GraphPage
rdPlot.Refresh();

Though the GraphPage::Refresh() refreshes the surface plot, it doesn't re-render the colormap. I.e., the colormap uses the old "Max" and "Min" values to render. However the new "Max" and "Min" values given by the above codes do indeed saved into the surface plot, as can be verified by the following. Right click the layer-icon of the graph, select "Layer Properties.." to open the "Plot Details" dialog box, expend the "Layer1" and select the dataset, go to "Color Map" on the right, click "Level" and read the "Minimum" and "Maximum". I refresh the colormap manually (instead of by program automatically) as follow. Go to the above "Colo Map" page, click the "Level", click the "OK" of the "Set Levels" dialog box, and then click "OK" of the "Plot Details" dialog box. Is there any class methods or functions that can refresh the colormap?

- Where can I find a complete documentation of Origin C? It seems to me that many plotting related class methods, class member variables, and global constants are undocumented in the Help. For example,
* the various IDM_PLOT_?? contants, as defined in oPlotDs.h files. They are required for GraphLayer::AddPlot when IDM_PLOT_UNKNOWN is not appropriate.
* the overloaded int GraphLayer::AddPlot(MatrixObject& matObj, int nPlotID = IDM_PLOT_MATRIX_IMAGE) class method.
* All member variables of classes, such as DataPlot.Surface, DataPlot.Curve, the "dVal" or "nVal" when using Tree to customize plots, etc.

Thank you so much for your help.

Mike Buess

USA
3037 Posts

Posted - 05/22/2007 :  1:37:16 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Where can I find a complete documentation of Origin C?
There is none. Like Origin itself, Origin's programming guide is evolving and documentation is added or changed with most service packs. Since you have the release version (SR0) I strongly recommend that you upgrade to the latest version (SR6). If your computer w/Origin is connected to the internet run Help > Check for Updates and download/install whatever is offered. Repeat until nothing is found to download. Note: the help files do not come with the Service Releases. When you're patched to SR6 run Check for Updates again to get the latest help files (Origin Programming V75 SR5).

I don't know if that will solve your colormap problems but it's useful to be on a common ground when you discuss them.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 05/22/2007 1:37:41 PM
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