(input, saveLocation, show=False,greyScale=False,flip=False)
| 7 | |
| 8 | |
| 9 | def plotExampleBox(input, saveLocation, show=False,greyScale=False,flip=False): |
| 10 | |
| 11 | if(flip): |
| 12 | input=np.transpose(input) |
| 13 | fig, ax = plt.subplots() |
| 14 | |
| 15 | if(greyScale): |
| 16 | cmap='gray' |
| 17 | else: |
| 18 | cmap='seismic' |
| 19 | |
| 20 | plt.axis('off') |
| 21 | |
| 22 | cax = ax.imshow(input, interpolation='nearest', cmap=cmap) |
| 23 | |
| 24 | plt.gca().set_axis_off() |
| 25 | plt.subplots_adjust(top = 1, bottom = 0, right = 1, left = 0, |
| 26 | hspace = 0, wspace = 0) |
| 27 | plt.margins(0,0) |
| 28 | plt.gca().xaxis.set_major_locator(plt.NullLocator()) |
| 29 | plt.gca().yaxis.set_major_locator(plt.NullLocator()) |
| 30 | plt.savefig(saveLocation+'.png' , bbox_inches = 'tight',pad_inches = 0) |
| 31 | |
| 32 | if(show): |
| 33 | plt.show() |
| 34 | plt.close() |
| 35 | |
| 36 | |
| 37 |
no outgoing calls
no test coverage detected