File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -409,17 +409,25 @@ arrays.
409409Also, note that while the DEFAULT tuplesize depends on whether we're making a 3D
410410plot, once a tuplesize is given, the logic doesn't care if a 3D plot is being
411411made. 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
415415x,y = np.ogrid[-10:11,-10:11]
416416gp.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+
423431Also note that the 'tuplesize' curve option is independent of implicit domains.
424432This option specifies not how many data arrays we have, but how many values
425433represent 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:
11371145x,y = np.ogrid[-10:11,-10:11]
11381146gp.plot( x**2 + y**2,
11391147 title = 'Heat map',
1140- set = 'view map',
11411148 _with = 'image',
11421149 tuplesize = 3)
11431150#+END_SRC
You can’t perform that action at this time.
0 commit comments