| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -67,9 +67,9 @@ | |||
| 67 | 67 | zticks=[0, -150, -300, -450], | |
| 68 | 68 | ) | |
| 69 | 69 | ||
| 70 | - # Set distance and angle view | ||
| 70 | + # Set zoom and angle view | ||
| 71 | 71 | ax.view_init(40, -30, 0) | |
| 72 | - ax.dist = 11 | ||
| 72 | + ax.set_box_aspect(None, zoom=0.9) | ||
| 73 | 73 | ||
| 74 | 74 | # Colorbar | |
| 75 | 75 | fig.colorbar(C, ax=ax, fraction=0.02, pad=0.1, label='Name [units]') | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,7 +45,7 @@ def label(xy, text): | |||
| 45 | 45 | label(grid[2], "Wedge") | |
| 46 | 46 | ||
| 47 | 47 | # add a Polygon | |
| 48 | - polygon = mpatches.RegularPolygon(grid[3], 5, 0.1) | ||
| 48 | + polygon = mpatches.RegularPolygon(grid[3], 5, radius=0.1) | ||
| 49 | 49 | patches.append(polygon) | |
| 50 | 50 | label(grid[3], "Polygon") | |
| 51 | 51 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,7 +45,7 @@ | |||
| 45 | 45 | ] | |
| 46 | 46 | ||
| 47 | 47 | for i in range(N): | |
| 48 | - polygon = Polygon(np.random.rand(N, 2), True) | ||
| 48 | + polygon = Polygon(np.random.rand(N, 2), closed=True) | ||
| 49 | 49 | patches.append(polygon) | |
| 50 | 50 | ||
| 51 | 51 | colors = 100 * np.random.rand(len(patches)) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -56,6 +56,9 @@ def bullseye_plot(ax, data, seg_bold=None, cmap=None, norm=None): | |||
| 56 | 56 | theta = np.linspace(0, 2 * np.pi, 768) | |
| 57 | 57 | r = np.linspace(0.2, 1, 4) | |
| 58 | 58 | ||
| 59 | + # Remove grid | ||
| 60 | + ax.grid(False) | ||
| 61 | + | ||
| 59 | 62 | # Create the bound for the segment 17 | |
| 60 | 63 | for i in range(r.shape[0]): | |
| 61 | 64 | ax.plot(theta, np.repeat(r[i], theta.shape), '-k', lw=linewidth) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,8 +23,8 @@ | |||
| 23 | 23 | l3, = axs[1].plot(x, y3, color='tab:green') | |
| 24 | 24 | l4, = axs[1].plot(x, y4, color='tab:red', marker='^') | |
| 25 | 25 | ||
| 26 | - fig.legend((l1, l2), ('Line 1', 'Line 2'), 'upper left') | ||
| 27 | - fig.legend((l3, l4), ('Line 3', 'Line 4'), 'upper right') | ||
| 26 | + fig.legend((l1, l2), ('Line 1', 'Line 2'), loc='upper left') | ||
| 27 | + fig.legend((l3, l4), ('Line 3', 'Line 4'), loc='upper right') | ||
| 28 | 28 | ||
| 29 | 29 | plt.tight_layout() | |
| 30 | 30 | plt.show() | |
| Back | FazBrowse Home | New Git URL |
0 commit comments