Nir Krakauer
2018-10-05 21:19:57 UTC
If an array contains NaN values, the corresponding areas show as
white/transparent in the plot window, but as black in the saved figure
(EPS/PNG/other). Is there any built-in way to change this, so that, for
example, NaNs render in white? I'm using 4.4.1 with FLTK graphics on a Mac.
Example code:
nx = 30; ny = 20;
arr = randn (nx, ny);
arr(11:20, :) = NaN;
imagesc (1:nx, 1:ny, arr'); colorbar
print ('-depsc', 'example')
white/transparent in the plot window, but as black in the saved figure
(EPS/PNG/other). Is there any built-in way to change this, so that, for
example, NaNs render in white? I'm using 4.4.1 with FLTK graphics on a Mac.
Example code:
nx = 30; ny = 20;
arr = randn (nx, ny);
arr(11:20, :) = NaN;
imagesc (1:nx, 1:ny, arr'); colorbar
print ('-depsc', 'example')