|
Force SetZBounds minZ below lowest data point |
Posted by Raoul on Jun-26-2013 01:04 |
|
I am using a contour layer (heat map) to display my data. I have set up some sliderbars to
allow the user to adjust the minimum and maximum z value, and then the data is displayed
using SetZBounds to set this range. This can sometimes help by letting you play with the
colors and search for features that can get lost in the heatmap.
This all works fine, as long as the selected minimum or maximum value is within the data
range. Is there anyway to force it to color scale the data to a range of my choosing?
For example, I have a normalized dataset where the values range from 0.5 to 1.0. I can set
the zrange values to anything between 0.5 and 1.0. However, I would like to be able to
force it to a minimum z range of 0 (even though I don't have a data point below 0.5). This
can again help me to interact with the data. Also, perhaps I am comparing two data sets
where the 1st one goes from 0 to 1, and the second set goes from .5 to 1. It is nice to
plot them on the same common colorscale so that "yellow" means a value of .8 on both
graphs.
It is like I want to first create a fake data set that creates the colorscale range that I want
(use color xx for data values between xx and xx), and then force that same colorscale to be
applied to my real data. |
Re: Force SetZBounds minZ below lowest data point |
Posted by Peter Kwan on Jun-26-2013 04:03 |
|
Hi Raoul,
Yes. You can directly set the scale used by the colorAxis. For example, in C#/Java, it is like:
//set the color scale to 0 - 1
myContourLayer.colorAxis().setLinearScale(0, 1, 0.1);
Hope this can help.
Regards
Peter Kwan |
Re: Force SetZBounds minZ below lowest data point |
Posted by Raoul on Jun-26-2013 05:08 |
|
You nailed it! Thanks peter... somehow I missed that.
That seems to do exactly what I needed. |
|