forked from floli/PyRBF
-
Notifications
You must be signed in to change notification settings - Fork 2
/
demo_BlockRegular.py
475 lines (408 loc) · 16.3 KB
/
demo_BlockRegular.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
""" Generates data to show the effect of rescaling. Low density basisfunctions used. """
import pandas
import os
import logging
from rbf import *
import basisfunctions, testfunctions
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
from mpl_toolkits import mplot3d
import time
import mesh
import math
from random import randint
from scipy import spatial
from halton import *
import vtk
import mesh_io
#from mpi4py import MPI
class Mesh:
"""
A Mesh consists of:
- Points: A list of tuples of floats representing coordinates of points
- Cells: A list of tuples of ints representing mesh elements
- Pointdata: A list of floats representing data values at the respective point
"""
def __init__(self, points = None, cells = None, cell_types = None, pointdata = None):
if points is not None:
self.points = points
else:
self.points = []
if cells is not None:
assert(cell_types is not None)
self.cells = cells
self.cell_types = cell_types
else:
self.cells = []
self.cell_types = []
if pointdata is not None:
self.pointdata = pointdata
else:
self.pointdata = []
def __str__(self):
return "Mesh with {} Points and {} Cells ({} Cell Types)".format(len(self.points), len(self.cells), len(self.cell_types))
def read_mesh(filename):
points, cells, cell_types, pointdata = mesh_io.read_mesh(filename)
#print("Points: ", len(points))
#print("Point data: ", pointdata)
return Mesh(points, cells, cell_types, pointdata)
#print("Hi, I'm process: ", rank)
#print(MPI.COMM_WORLD.rank)
#if (MPI.COMM_WORLD.rank == 0):
# print("This is the master rank")
#Xtest = np.outer(np.linspace(-2, 2, 100), np.ones(100))
#Ytest = Xtest.copy().T # transpose
#Xtest, Ytest = np.meshgrid(Xtest, Ytest)
#Ztest = np.cos(Xtest ** 2 + Ytest ** 2)
#fig = plt.figure()
#ax = fig.gca(projection='3d')
#ax.set_title('Test grid')
#ax.plot_surface(Xtest, Ytest, Ztest,cmap='viridis',linewidth=0,edgecolor='black')
#plt.show()
mesh_name = "Mesh/Plate/l1Data.vtk"
mesh = read_mesh(mesh_name)
#print("Number of points: ", mesh.points)
start = time.time()
j = 0
#nPoints = len(mesh.points)
nPoints = 100
nPointsOut = 500
#print("Number of points: ",nPoints)
inLenTotal = 60
outLenTotal = 45
InedgeLengthX = 3.0
InedgeLengthY = 3.0
OutedgeLengthX = 3.0
OutedgeLengthY = 3.0
InxMinLength = 0.0
InyMinLength = 0.0
OutxMinLength = 0.0
OutyMinLength = 0.0
#in_size = np.linspace(xMinLength, edgeLengthX + xMinLength, inLenTotal)
#out_size = np.linspace(yMinLength, edgeLengthY + yMinLength, outLenTotal)
in_mesh = np.random.random((pow(inLenTotal,2),2))
out_mesh = np.random.random((pow(outLenTotal,2),2))
out_mesh_Combined = np.random.random((pow(outLenTotal,2),2))
out_mesh_Split = np.random.random((pow(outLenTotal,2),2))
out_mesh_Combined_value = []
out_mesh_Split_value = []
for i in range(0,inLenTotal):
for j in range(0,inLenTotal):
in_mesh[j+i*inLenTotal,0] = (InedgeLengthX/inLenTotal)*j
in_mesh[j+i*inLenTotal,1] = (InedgeLengthY/inLenTotal)*i
for i in range(0,outLenTotal):
for j in range(0,outLenTotal):
out_mesh[j+i*outLenTotal,0] = (OutedgeLengthX/outLenTotal)*j + OutxMinLength
out_mesh[j+i*outLenTotal,1] = (OutedgeLengthY/outLenTotal)*i + OutyMinLength
out_mesh_Combined[j+i*outLenTotal,0] = (OutedgeLengthX/outLenTotal)*j + OutxMinLength
out_mesh_Combined[j+i*outLenTotal,1] = (OutedgeLengthY/outLenTotal)*i + OutyMinLength
out_mesh_Split[j+i*outLenTotal,0] = (OutedgeLengthX/outLenTotal)*j + OutxMinLength
out_mesh_Split[j+i*outLenTotal,1] = (OutedgeLengthY/outLenTotal)*i + OutyMinLength
#mesh_size = 1/math.sqrt(nPoints)
mesh_size = InedgeLengthX/inLenTotal
shape_parameter = 4.55228/((5.0)*mesh_size)
print("shape_parameter: ", shape_parameter)
bf = basisfunctions.Gaussian(shape_parameter)
func = lambda x,y: 0.5*np.sin(0.2*x*y)+(0.0000001*y)
funcTan = lambda x,y: np.arctan(125*(pow(pow(x-1.5,2) + pow(y-0.25,2),0.5) - 0.92))
one_func = lambda x: np.ones_like(x)
in_vals = func(in_mesh[:,0],in_mesh[:,1])
out_vals = func(out_mesh[:,0],out_mesh[:,1])
#start = time.time()
#interpRational = Rational(bf, in_mesh, in_vals, rescale = False)
#end = time.time()
#print("Time for inversion: ", end-start)
#start = time.time()
#fr = interpRational(in_vals, out_mesh)
fr = func(out_mesh[:,0],out_mesh[:,1])
#end = time.time()
#print("Time for eigen decomposition: ", end-start)
interp = NoneConsistent(bf, in_mesh, in_vals, rescale = False)
fr_regular = interp(out_mesh)
#fr_regular = func(out_mesh[:,0],out_mesh[:,1])
#out_vals = funcTan(out_mesh[:,0], out_mesh[:,1])
#print("out_vals: ", max(fr))
#print("Error fr= ", np.linalg.norm(out_vals - fr, 2))
#print("max fr: ", max(out_vals - fr))
print("Error fr_regular= ", np.linalg.norm(out_vals - fr_regular, 2))
maxRegError = max(out_vals - fr_regular)
#print("max fr: ", max(out_vals - fr))
print("max regular: ", maxRegError)
Xtotal = np.linspace(OutxMinLength, OutedgeLengthX + OutxMinLength, outLenTotal)
Ytotal = np.linspace(OutyMinLength, OutedgeLengthY + OutyMinLength, outLenTotal)
#Y = np.arange(-5, 5, 0.25)
Xtotal, Ytotal = np.meshgrid(Xtotal, Ytotal)
#R = np.sqrt(X**2 + Y**2)
#Z = np.sin(R)
X = np.linspace(InxMinLength, InedgeLengthX + InxMinLength, inLenTotal)
Y = np.linspace(InyMinLength, InedgeLengthY + InyMinLength, inLenTotal)
X, Y = np.meshgrid(X, Y)
Zin = np.arctan(125*(pow(pow(X-1.5,2) + pow(Y-0.25,2),0.5) - 0.92))
Z = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
Z_combined = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
Z_split = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
Z_regular = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
Z_regular_error = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
Z_rational = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
Z_rational_global = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
Z_rational_error = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
Z_rational_error_final = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
Z_regular_global = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
Z_regular_error_global = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
Z_rational_error_global = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
#print(Z)
k=0
for i in range(0,inLenTotal):
for j in range(0,inLenTotal):
Zin[i,j] = in_vals[k]
k += 1
k=0
for i in range(0,outLenTotal):
for j in range(0,outLenTotal):
Z[i,j] = out_vals[k]
Z_combined[i,j] = out_vals[k]
Z_split[i,j] = 0
Z_rational[i,j] = fr[k]
Z_rational_global[i,j] = fr[k]
Z_rational_error[i,j] = out_vals[k]- fr[k]
Z_rational_error_global[i,j] = out_vals[k] - fr[k]
Z_regular[i,j] = fr_regular[k]
Z_regular_global[i,j] = fr_regular[k]
Z_regular_error[i,j] = out_vals[k] - fr_regular[k]
Z_regular_error_global[i,j] = out_vals[k]- fr_regular[k]
k += 1
'''
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_title('In Grid')
ax.plot_surface(X, Y, Zin,cmap='viridis',linewidth=0,edgecolor='black')
plt.show()
#save_plot(fileName='plot_01.py',obj=sys.argv[0],sel='plot',ctx=libscript.get_ctx(ctx_global=globals(),ctx_local=locals()))
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_title('Actual - out Grid')
ax.plot_surface(Xtotal, Ytotal, Z_combined,cmap='viridis',linewidth=0,edgecolor='black')
plt.show()
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_title('Regular')
ax.plot_surface(Xtotal, Ytotal, Z_regular,cmap='viridis',linewidth=0,edgecolor='black')
plt.show()
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_title('Rational')
ax.plot_surface(Xtotal, Ytotal, Z_rational,cmap='viridis',linewidth=0)
plt.show()
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_title('Regular - error')
ax.plot_surface(Xtotal, Ytotal, Z_regular_error,cmap='viridis',linewidth=0)
plt.show()
'''
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_title('Regular - error')
#ax.set_zlim(-0.001, 0.001)
ax.plot_surface(Xtotal, Ytotal, Z_regular_error,cmap='viridis',linewidth=0)
plt.show()
#Z = in_vals
# Plot the surface.
#surf = ax.plot_surface(X, Y, Z,cmap='viridis',linewidth=0)
#ax.plot_surface(X, Y, Z_regular,cmap='viridis',linewidth=0)
# Customize the z axis.
#ax.set_zlim(-4.0, 4.0)
#ax.zaxis.set_major_locator(LinearLocator(10))
#ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))
# Add a color bar which maps values to colors.
#fig.colorbar(surf, shrink=0.5, aspect=5)
#ax.plot_surface(X, Y, Z_regular,cmap='viridis',linewidth=0)
#ax.plot_surface(X, Y, Z_rational,cmap='viridis',linewidth=0)
#plt.show()
#fig, axs = plt.subplots(2, 2)
#axs[0, 0].plot_surface(X, Y, Z,cmap='viridis',linewidth=0)
#axs[0, 0].set_title('Axis [0, 0]')
#axs[0, 1].plot_surface(X, Y, Z_regular,cmap='viridis',linewidth=0)
#axs[0, 1].set_title('Axis [0, 1]')
#axs[1, 0].plot_surface(X, Y, Z_rational,cmap='viridis',linewidth=0)
#axs[1, 0].set_title('Axis [1, 0]')
'''
How many blocks in each direction to break problem into
'''
domainDecomposition = 3
inLen = int(inLenTotal/domainDecomposition)
outLen = int(outLenTotal/domainDecomposition)
#inLen = 20
#outLen = 30
boundaryExtension = 14 #Must be even number!!!
edgeLengthX = InedgeLengthX/domainDecomposition
edgeLengthY = InedgeLengthY/domainDecomposition
xMinLength = 0.0
yMinLength = 0.0
if domainDecomposition > 1:
#shift = (InedgeLengthX - (edgeLengthX + (edgeLengthX*boundaryExtension/inLen)))/(domainDecomposition - 1)
shift = edgeLengthX*boundaryExtension/(2*inLen)
else:
shift = 1
print("Shift value:", InedgeLengthX,edgeLengthX + (edgeLengthX*boundaryExtension/inLen), shift)
start = time.time()
domainCount= 0
for dd1 in range(0,domainDecomposition):
for dd2 in range(0,domainDecomposition):
if (dd1 == 0):
shiftX = 0.0
elif (dd1 == 1):
shiftX = 0.65
elif (dd1 == 2):
shiftX = 1.3
else:
shiftX = 1.5
if (dd2 == 0):
shiftY = 0.0
elif (dd2 == 1):
shiftY = 0.65
elif (dd2 == 2):
shiftY = 1.3
else:
shiftY = 1.5
xMinLength = 0.0 + shiftX
yMinLength = 0.0 + shiftY
xMinLengthOut = 0.0 + dd1*edgeLengthY
yMinLengthOut = 0.0 + dd2*edgeLengthY
print("Properties: ",inLen, outLen,xMinLength,yMinLength,xMinLengthOut, yMinLengthOut,dd1,dd2)
print("domain count: ",domainCount)
domainCount += 1
in_size = np.linspace(xMinLength, edgeLengthX + xMinLength, inLen+boundaryExtension)
#in_size = np.linspace(xMinLength, edgeLengthX + xMinLength, inLen)
out_size = np.linspace(yMinLength, edgeLengthY + yMinLength, outLen)
in_mesh = np.random.random((pow(inLen+boundaryExtension,2),2))
out_mesh = np.random.random((pow(outLen,2),2))
for i in range(0,inLen+boundaryExtension):
for j in range(0,inLen+boundaryExtension):
#in_mesh[j+i*(inLen),0] = (edgeLengthX/inLen)*j + xMinLength
#in_mesh[j+i*(inLen),1] = (edgeLengthX/inLen)*i + yMinLength
in_mesh[j+i*(inLen+boundaryExtension),0] = (edgeLengthX/inLen)*j + xMinLength
in_mesh[j+i*(inLen+boundaryExtension),1] = (edgeLengthX/inLen)*i + yMinLength
#if i == 0:
# print("in_mesh: ",in_mesh[j+i*(inLen+boundaryExtension),0])
for i in range(0,outLen):
for j in range(0,outLen):
out_mesh[j+i*outLen,0] = (edgeLengthY/outLen)*j + xMinLengthOut
out_mesh[j+i*outLen,1] = (edgeLengthY/outLen)*i + yMinLengthOut
#if i == 0:
# print("out_mesh: ",out_mesh[j+i*outLen,0])
#mesh_size = 1/math.sqrt(nPoints)
#mesh_size = edgeLengthX/inLen
#shape_parameter = 4.55228/((4.0)*mesh_size)
print("Min in: ", in_mesh[0,0], in_mesh[0,1])
print("Max in: ", in_mesh[(inLen+boundaryExtension)*(inLen+boundaryExtension)-1,0], in_mesh[(inLen+boundaryExtension)*(inLen+boundaryExtension)-1,1])
print("Min in: ", out_mesh[0,0], out_mesh[0,1])
print("Max in: ", out_mesh[outLen*outLen-1,0], out_mesh[outLen*outLen-1,1])
print("shape_parameter: ", shape_parameter)
bf = basisfunctions.Gaussian(shape_parameter)
func = lambda x,y: 0.5*np.sin(0.2*x*y)+(0.0000001*y)
funcTan = lambda x,y: np.arctan(125*(pow(pow(x-1.5,2) + pow(y-0.25,2),0.5) - 0.92))
one_func = lambda x: np.ones_like(x)
in_vals = func(in_mesh[:,0],in_mesh[:,1])
out_vals = func(out_mesh[:,0],out_mesh[:,1])
#interpRational = Rational(bf, in_mesh, in_vals, rescale = False)
#fr = interpRational(in_vals, out_mesh)
fr = func(out_mesh[:,0],out_mesh[:,1])
interp = NoneConsistent(bf, in_mesh, in_vals, rescale = False)
fr_regular = interp(out_mesh)
#fr_regular = func(out_mesh[:,0],out_mesh[:,1])
#out_vals = funcTan(out_mesh[:,0], out_mesh[:,1])
#print("out_vals: ", max(fr))
#print("Error fr= ", np.linalg.norm(out_vals - fr, 2))
print("Error fr_regular= ", np.linalg.norm(out_vals - fr_regular, 2))
maxRegError = max(out_vals - fr_regular)
#print("max fr: ", max(out_vals - fr))
print("max regular: ", maxRegError)
X = np.linspace(xMinLength, edgeLengthX + xMinLength, outLen)
Y = np.linspace(yMinLength, edgeLengthY + yMinLength, outLen)
X, Y = np.meshgrid(X, Y)
Z = np.arctan(125*(pow(pow(X-1.5,2) + pow(Y-0.25,2),0.5) - 0.92))
Z_regular = np.arctan(125*(pow(pow(X-1.5,2) + pow(Y-0.25,2),0.5) - 0.92))
Z_regular_error = np.arctan(125*(pow(pow(X-1.5,2) + pow(Y-0.25,2),0.5) - 0.92))
Z_rational = np.arctan(125*(pow(pow(X-1.5,2) + pow(Y-0.25,2),0.5) - 0.92))
Z_rational_error = np.arctan(125*(pow(pow(X-1.5,2) + pow(Y-0.25,2),0.5) - 0.92))
k=0
for i in range(0,outLen):
for j in range(0,outLen):
Z[i,j] = out_vals[k]
Z_split[i+(outLen*dd2),j+(outLen*dd1)] = fr_regular[k]
Z_rational[i,j] = fr[k]
Z_rational_error[i,j] = out_vals[k]- fr[k]
Z_regular[i,j] = fr_regular[k]
Z_regular_error[i,j] = out_vals[k]- fr_regular[k]
k += 1
#fig = plt.figure()
#ax = fig.gca(projection='3d')
#ax.set_xlabel('Actual')
#ax.plot_surface(Xtotal, Ytotal, Z_split,cmap='viridis',linewidth=0,edgecolor='black')
#plt.show()
end = time.time()
print("Time for decomposed problem eigen decomposition: ", end-start)
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_xlabel('Local RBF - regular')
ax.plot_surface(Xtotal, Ytotal, Z_split,cmap='viridis',linewidth=0,edgecolor='black')
plt.show()
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_xlabel('Regular')
ax.plot_surface(X, Y, Z_regular,cmap='viridis',linewidth=0,edgecolor='black')
plt.show()
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_xlabel('Rational')
ax.plot_surface(X, Y, Z_rational,cmap='viridis',linewidth=0)
plt.show()
'''
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_xlabel('Regular Error')
ax.plot_surface(X, Y, Z_regular_error,cmap='viridis',linewidth=0)
plt.show()
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_xlabel('Rational Error')
ax.plot_surface(X, Y, Z_rational_error,cmap='viridis',linewidth=0)
plt.show()
'''
Z_split_error = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
Z_error_diff = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
Z_regular_diff = np.arctan(125*(pow(pow(Xtotal-1.5,2) + pow(Ytotal-0.25,2),0.5) - 0.92))
max_global_regular_error = []
for i in range(0,outLenTotal):
for j in range(0,outLenTotal):
Z_split_error[i,j] = Z_combined[i,j] - Z_split[i,j]
Z_regular_diff[i,j] = Z_regular_global[i,j] - Z_split[i,j]
#if (Z_split_error[i,j] > 0.004):
# Z_split_error[i,j] = 0.004
#if (Z_split_error[i,j] < -0.004):
# Z_split_error[i,j] = -0.004
Z_error_diff[i,j] = Z_regular_error_global[i,j] - Z_split_error[i,j]
max_global_regular_error.append(Z_regular_error_global[i,j])
print("Error of Global rational RBF: ", np.linalg.norm(Z_regular_error_global, 2))
print("Error of Rational RBF sub-domains combined: ", np.linalg.norm(Z_split_error, 2))
print("Max Global: ", max(max_global_regular_error))
#print("Max Local: ", max(Z_split_error))
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_title('Regular split mesh error when combined onto full grid')
#ax.set_zlim(-0.00025, 0.00025)
ax.plot_surface(Xtotal, Ytotal, Z_split_error,cmap='viridis',linewidth=0,edgecolor='black')
plt.show()
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_title('Regular RBF Global - Local')
#ax.set_zlim(-0.00025, 0.00025)
ax.plot_surface(Xtotal, Ytotal, Z_regular_diff,cmap='viridis',linewidth=0,edgecolor='black')
plt.show()
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_title('Difference between the Global vs Local Regular RBF error magnitudes')
#ax.set_zlim(-0.00025, 0.00025)
ax.plot_surface(Xtotal, Ytotal, Z_error_diff,cmap='viridis',linewidth=0,edgecolor='black')
plt.show()