problem plotting figure with nan