[Tioga-users] monochrome image
Edwin
edder at tkwsping.nl
Tue Dec 12 08:34:39 EST 2006
Hi all,
I have a lot of x,y data, with corresponding z values and am trying to
plot a contourplot. A normal contourplot is working well using the
following:
t.show_plot( [0, 1, 1, 0] ) {
image = t.create_image_data( zs,
'min_value' => -0.8, 'max_value' => 0.8 )
t.show_image( 'll' => [0, 0],
'lr' => [1, 0],
'ul' => [0, 1],
'color_space' => t.mellow_colormap,
'data' => image, 'w' => steps+1, 'h' => steps+1)
}
But I'm actually only interested if the value is above or below 0 and want
to plot everything above 0 grey and keep everything else white. I think I
need the create_monochrome_image_data for that but can't figure it out.
I tried just setting:
t.create_image_data( zs, 'boundary' => 0.0 ) and 'color_space' => 'mono',
but this doesn't seem to work (I get a plot, but it doesn't match in
anyway with the data).
I also tried setting the stencil_mask in show_image, but got the following
error:
undefined method `each_key' for #<String:0xb7a7e308> [version: 1.2.1]
What is the correct way to do this?
Edwin
More information about the Tioga-users
mailing list