File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -375,15 +375,21 @@ class gnuplotlib has a separate gnuplot process and a plot window. If multiple
375375Also, note that while the DEFAULT tuplesize depends on whether we're making a 3D
376376plot, once a tuplesize is given, the logic doesn't care if a 3D plot is being
377377made. It can make sense to have a 2D implicit domain when making 2D plots. For
378- example, one can be plotting a color map:
378+ example, one can be plotting a color map from an array of shape (H,W) :
379379
380380 x,y = np.ogrid[-10:11,-10:11]
381381 gp.plot( x**2 + y**2,
382382 title = 'Heat map',
383- set = 'view map',
384383 _with = 'image',
385384 tuplesize = 3)
386385
386+ Or a full-color image from an array of shape (H,W,3)
387+
388+ gp.plot( *nps.mv(image, -1,0),
389+ title = 'Full-color image',
390+ _with = 'rgbimage',
391+ tuplesize = 5)
392+
387393Also note that the 'tuplesize' curve option is independent of implicit domains.
388394This option specifies not how many data arrays we have, but how many values
389395represent each data point. For example, if we want a 2D line plot with varying
@@ -1036,7 +1042,6 @@ class gnuplotlib has a separate gnuplot process and a plot window. If multiple
10361042 x,y = np.ogrid[-10:11,-10:11]
10371043 gp.plot( x**2 + y**2,
10381044 title = 'Heat map',
1039- set = 'view map',
10401045 _with = 'image',
10411046 tuplesize = 3)
10421047
You can’t perform that action at this time.
0 commit comments