help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

imagesc rendering of NaN values


From: Nir Krakauer
Subject: imagesc rendering of NaN values
Date: Fri, 5 Oct 2018 17:19:57 -0400

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')

reply via email to

[Prev in Thread] Current Thread [Next in Thread]