Skip to content

Commit f622d5d

Browse files
committed
README
1 parent 37dfed2 commit f622d5d

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.org

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,17 +409,25 @@ arrays.
409409
Also, note that while the DEFAULT tuplesize depends on whether we're making a 3D
410410
plot, once a tuplesize is given, the logic doesn't care if a 3D plot is being
411411
made. It can make sense to have a 2D implicit domain when making 2D plots. For
412-
example, one can be plotting a color map:
412+
example, one can be plotting a color map from an array of shape (H,W):
413413

414414
#+BEGIN_SRC python
415415
x,y = np.ogrid[-10:11,-10:11]
416416
gp.plot( x**2 + y**2,
417417
title = 'Heat map',
418-
set = 'view map',
419418
_with = 'image',
420419
tuplesize = 3)
421420
#+END_SRC
422421

422+
Or a full-color image from an array of shape (H,W,3)
423+
424+
#+BEGIN_SRC python
425+
gp.plot( *nps.mv(image, -1,0),
426+
title = 'Full-color image',
427+
_with = 'rgbimage',
428+
tuplesize = 5)
429+
#+END_SRC
430+
423431
Also note that the 'tuplesize' curve option is independent of implicit domains.
424432
This option specifies not how many data arrays we have, but how many values
425433
represent each data point. For example, if we want a 2D line plot with varying
@@ -1137,7 +1145,6 @@ Image arrays plots can be plotted as a heat map:
11371145
x,y = np.ogrid[-10:11,-10:11]
11381146
gp.plot( x**2 + y**2,
11391147
title = 'Heat map',
1140-
set = 'view map',
11411148
_with = 'image',
11421149
tuplesize = 3)
11431150
#+END_SRC

0 commit comments

Comments
 (0)