File mplot/maxes.py changed (mode: 100644) (index c408b44..d024c01) |
... |
... |
__all__ = [ |
36 |
36 |
] |
] |
37 |
37 |
|
|
38 |
38 |
|
|
39 |
|
def _setup_labels(ax, data_offset=0.5): |
|
40 |
|
if ax.space in ('P', 'aP', 'U', 'aU'): |
|
41 |
|
ax.set_xlabel("$x_1$") |
|
42 |
|
ax.set_ylabel("$x_2$") |
|
43 |
|
else: |
|
44 |
|
text = ax.text(1, -data_offset, '$x_1$', ha='center',va='top', transform=ax.get_yaxis_transform()) |
|
45 |
|
text.set_in_layout(False) |
|
46 |
|
text = ax.text(-data_offset, 1, '$x_2~$', ha='right',va='center', transform=ax.get_xaxis_transform()) |
|
47 |
|
text.set_in_layout(False) |
|
|
39 |
|
|
48 |
40 |
|
|
49 |
41 |
|
|
50 |
42 |
def candidates_sampling_plot(ax, linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1]): |
def candidates_sampling_plot(ax, linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1]): |
|
... |
... |
def tri_nodes_plot(ax, tri_space=None, tn_scheme=None,\ |
159 |
151 |
assert 100500 < 0 #оӵ мар лэсьтӥське татын? |
assert 100500 < 0 #оӵ мар лэсьтӥське татын? |
160 |
152 |
|
|
161 |
153 |
mart.plot_sample(ax, kwargs['nodes'], ls='', marker='.',\ |
mart.plot_sample(ax, kwargs['nodes'], ls='', marker='.',\ |
162 |
|
mec=color, mfc=color, ms=1, alpha=0.5, rasterized=True) |
|
|
154 |
|
mew=0, mfc=color, ms=2, alpha=0.5, rasterized=True) |
163 |
155 |
|
|
164 |
156 |
|
|
165 |
157 |
|
|
|
... |
... |
def tri_nodes_plot(ax, tri_space=None, tn_scheme=None,\ |
187 |
179 |
mart.plot_boundaries(ax, lw=0.7, zorder=1050) |
mart.plot_boundaries(ax, lw=0.7, zorder=1050) |
188 |
180 |
except: |
except: |
189 |
181 |
pass |
pass |
190 |
|
_setup_labels(ax) |
|
|
182 |
|
mart.setup_labels(ax) |
191 |
183 |
|
|
192 |
184 |
def tri_R_nodes_plot(ax, **kwargs): |
def tri_R_nodes_plot(ax, **kwargs): |
193 |
185 |
tri_nodes_plot(ax, tri_space='R', **kwargs) |
tri_nodes_plot(ax, tri_space='R', **kwargs) |
|
... |
... |
def tri_plot(ax, tri_space=None, linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1], data |
223 |
215 |
mart.plot_boundaries(ax, lw=0.7, zorder=1050) |
mart.plot_boundaries(ax, lw=0.7, zorder=1050) |
224 |
216 |
except: |
except: |
225 |
217 |
pass |
pass |
226 |
|
_setup_labels(ax, data_offset) |
|
|
218 |
|
mart.setup_labels(ax, data_offset) |
227 |
219 |
|
|
228 |
220 |
|
|
229 |
221 |
|
|
|
... |
... |
def convex_hull_plot(ax, tri_space=None, linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0. |
250 |
242 |
mart.plot_boundaries(ax, lw=0.7, zorder=1050) |
mart.plot_boundaries(ax, lw=0.7, zorder=1050) |
251 |
243 |
except: |
except: |
252 |
244 |
pass |
pass |
253 |
|
_setup_labels(ax) |
|
|
245 |
|
mart.setup_labels(ax) |
254 |
246 |
|
|
255 |
247 |
def just_points(ax): |
def just_points(ax): |
256 |
248 |
ax.set_xlabel('$x_{1}$') |
ax.set_xlabel('$x_{1}$') |
File mplot/mfigs.py changed (mode: 100644) (index 9bfe346..a233f58) |
... |
... |
def double_tri_R_twins_plot(fig, sample_box, space): |
61 |
61 |
ax.space = 'G' |
ax.space = 'G' |
62 |
62 |
maxes.tri_nodes_plot(ax, tri_space='R', tn_scheme=tn_scheme) |
maxes.tri_nodes_plot(ax, tri_space='R', tn_scheme=tn_scheme) |
63 |
63 |
ax.set_title(r'$\mathcal{G}$', pad=10) |
ax.set_title(r'$\mathcal{G}$', pad=10) |
64 |
|
ax.sharey(ax1) |
|
|
64 |
|
y_bound = ax.get_ybound() |
|
65 |
|
ax1.sharey(ax) |
|
66 |
|
ax.set_ybound(y_bound) |
65 |
67 |
|
|
66 |
68 |
def double_tri_R_plot(fig, sample_box, space): |
def double_tri_R_plot(fig, sample_box, space): |
67 |
69 |
ax1 = ax = fig.add_subplot(121) |
ax1 = ax = fig.add_subplot(121) |