|
Multiple Surface charts |
Posted by Stephen Hill on Jul-21-2011 22:39 |
|
Hi,
I'm trying to visulize 2 data sets (same x, y data grid points, different z values) using 2 surface chart in the same control. I was trying to merge the two surface charts, but having issues with the z axis and color axis. Is there a way to implement this ?
Thanks in advance,
Steve |
Re: Multiple Surface charts |
Posted by Peter Kwan on Jul-22-2011 02:46 |
|
Hi Stephen,
Do you mean you would like to plot two surfaces in the same XYZ region (that is, they shared the same x, y and z axes)?
If you are absolutely sure one surface is absolutely in front of another surface (so you can plot one surface first, followed by the other), you may try to merge the two charts.
For the z-axis, it needs to be configured so that it takes into consideration the data from both surfaces. I suggest you try to get the min and max z values by considering the z coordinates of both surfaces, then use:
double margin = (maxZ - minZ) * 0.15;
c.zAxis().setLinearScale(minZ - margin, maxZ + margin);
The above code can be used in both charts, so they now have the same z-axis scale and same color legend.
For the second chart, you would need to hide the XYZ "walls" and not show the color legend, so there is just the surface to be merged to the first chart.
Hope this can help.
Regards
Peter Kwan |
|