taxilobi.blogg.se

Veusz matplotlib
Veusz matplotlib






# for the demo: loading the 'flat' triangles for plot

veusz matplotlib

Z_expected = experiment_res(tri_refi.x, tri_refi.y) Tri_refi, z_test_refi = refiner.refine_field(z_test, subdiv=subdiv) Mask = TriAnalyzer(tri).get_flat_tri_mask(min_circle_ratio) # masking badly shaped triangles at the border of the triangular mesh. # Improving the triangulation before high-res plots: removing flat triangles Masked_tri = random_gen.randint(0, ntri, int(ntri*init_mask_frac)) Mask_init = np.zeros(ntri, dtype=np.bool) #y_test = random_gen.uniform(-1., 1., size=n_test) #x_test = random_gen.uniform(-1., 1., size=n_test) # ratio below this will be masked if they touch a 01 # Minimum circle ratio - border triangles with circle # (invalid) initial triangles which will be masked # for the refine mesh: new triangles numbering = (4**subdiv)*ntri Values >3 might result in a very high number of triangles Subdiv = 3 # Number of recursive subdivisions of the initial mesh for smooth N_test = 200 # Number of test data points, tested from 3 to 5000 for subdiv=3 # Generating the initial data test points and triangulation for the demo """ An analytic function representing experiment results """ from i import Triangulation, TriAnalyzer, UniformTriRefiner However, for the triangular axis + labels and ticks, I don't know yet, but if anyone has a solution, I'll take it ) Note that, you can remove the x,y axes by doing: plt.axis('off')

veusz matplotlib

Trimesh = refiner.refine_triangulation(subdiv=4) Refiner = tri.UniformTriRefiner(triangle) Triangle = tri.Triangulation(corners, corners) # create a triangulation out of these pointsĬorners = np.array(,, ]) # first load some data: format x1,x2,x3,value You can try something like that: import numpy as np








Veusz matplotlib