File mplot/maxes.py changed (mode: 100644) (index ab63a45..6daa9dd) |
... |
... |
def convergence_legend(ax): |
175 |
175 |
#č protože já vím, že v těch obrázcích, ve kterých chcu ho použit, |
#č protože já vím, že v těch obrázcích, ve kterých chcu ho použit, |
176 |
176 |
#č můde být třeba použit řez a skříňka tedy potřebné struktury může nemít |
#č můde být třeba použit řez a skříňka tedy potřebné struktury může nemít |
177 |
177 |
def tri_nodes_plot(ax, tri_space=None, tn_scheme=None, ms=2.5, mew=0.6, lw=0.7, |
def tri_nodes_plot(ax, tri_space=None, tn_scheme=None, ms=2.5, mew=0.6, lw=0.7, |
178 |
|
linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1]): |
|
|
178 |
|
linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1], nrid=200): |
179 |
179 |
from .. import simplex as six |
from .. import simplex as six |
180 |
180 |
if tri_space is None: |
if tri_space is None: |
181 |
181 |
tri_space = ax.space |
tri_space = ax.space |
|
... |
... |
def tri_nodes_plot(ax, tri_space=None, tn_scheme=None, ms=2.5, mew=0.6, lw=0.7, |
224 |
224 |
on_delete_simplex=None) |
on_delete_simplex=None) |
225 |
225 |
|
|
226 |
226 |
mart.setup(ax) |
mart.setup(ax) |
227 |
|
mart.curly(ax, linewidths=linewidths) |
|
|
227 |
|
mart.curly(ax, nrid=nrid, linewidths=linewidths) |
228 |
228 |
Tri.integrate() |
Tri.integrate() |
229 |
229 |
if tri_space == ax.space: |
if tri_space == ax.space: |
230 |
230 |
mart.triplot(ax, color="#B2B2B2", lw=lw/1.4, zorder=100) |
mart.triplot(ax, color="#B2B2B2", lw=lw/1.4, zorder=100) |
231 |
231 |
else: |
else: |
232 |
|
mart.tri_plot(ax, Tri=Tri, color="#B2B2B2", lw=lw/1.4, zorder=100) |
|
|
232 |
|
mart.tri_plot(ax, Tri=Tri, color="#B2B2B2", lw=lw/1.4, zorder=100, rasterized=True) |
233 |
233 |
|
|
234 |
234 |
mart.plot_points(ax, ms=ms, mew=mew, zorder=100500) |
mart.plot_points(ax, ms=ms, mew=mew, zorder=100500) |
235 |
235 |
try: |
try: |
|
... |
... |
def tri_GK_nodes_plot(ax, **kwargs): |
249 |
249 |
#č protože já vím, že v těch obrázcích, ve kterých chcu ho použit, |
#č protože já vím, že v těch obrázcích, ve kterých chcu ho použit, |
250 |
250 |
#č můde být třeba použit řez a skříňka tedy potřebné struktury může nemít |
#č můde být třeba použit řez a skříňka tedy potřebné struktury může nemít |
251 |
251 |
def tri_plot(ax, tri_space=None, linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1], |
def tri_plot(ax, tri_space=None, linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1], |
252 |
|
ms=2.5, mew=0.6, lw=0.7, data_offset=0.5): |
|
|
252 |
|
ms=2.5, mew=0.6, lw=0.7, data_offset=0.5, nrid=200): |
253 |
253 |
from .. import simplex as six |
from .. import simplex as six |
254 |
254 |
if tri_space is None: |
if tri_space is None: |
255 |
255 |
tri_space = ax.space |
tri_space = ax.space |
|
... |
... |
def tri_plot(ax, tri_space=None, linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1], |
262 |
262 |
on_delete_simplex=None) |
on_delete_simplex=None) |
263 |
263 |
|
|
264 |
264 |
mart.setup(ax) |
mart.setup(ax) |
265 |
|
mart.curly(ax, linewidths=linewidths) |
|
|
265 |
|
mart.curly(ax, nrid=nrid, linewidths=linewidths) |
266 |
266 |
if tri_space == ax.space: |
if tri_space == ax.space: |
267 |
267 |
mart.triplot(ax, color="#B2B2B2", lw=lw/1.4, zorder=100) |
mart.triplot(ax, color="#B2B2B2", lw=lw/1.4, zorder=100) |
268 |
268 |
else: |
else: |
269 |
|
mart.tri_plot(ax, Tri=Tri, color="#B2B2B2", lw=lw/1.4, zorder=100) |
|
|
269 |
|
mart.tri_plot(ax, Tri=Tri, color="#B2B2B2", lw=lw/1.4, zorder=100, rasterized=True) |
270 |
270 |
|
|
271 |
271 |
mart.plot_points(ax, ms=ms, mew=mew, zorder=100500) |
mart.plot_points(ax, ms=ms, mew=mew, zorder=100500) |
272 |
272 |
try: |
try: |
|
... |
... |
def tri_GK_plot(ax, **kwargs): |
286 |
286 |
#č ten [plot] zásadně vytvaří svou obálku, nepouzívá onou ze skříňky, |
#č ten [plot] zásadně vytvaří svou obálku, nepouzívá onou ze skříňky, |
287 |
287 |
#č protože já vím, že v těch obrázcích, ve kterých chcu ho použit, |
#č protože já vím, že v těch obrázcích, ve kterých chcu ho použit, |
288 |
288 |
#č můde být třeba použit řez a skříňka tedy potřebné struktury může nemít |
#č můde být třeba použit řez a skříňka tedy potřebné struktury může nemít |
289 |
|
def convex_hull_plot(ax, tri_space=None, ms=2.5, mew=0.6, lw=0.7, |
|
|
289 |
|
def convex_hull_plot(ax, tri_space=None, ms=2.5, mew=0.6, lw=0.7, nrid=200, |
290 |
290 |
linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1]): |
linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1]): |
291 |
291 |
from .. import convex_hull as khull |
from .. import convex_hull as khull |
292 |
292 |
if tri_space is None: |
if tri_space is None: |
293 |
293 |
tri_space = ax.space |
tri_space = ax.space |
294 |
294 |
|
|
295 |
295 |
mart.setup(ax) |
mart.setup(ax) |
296 |
|
mart.curly(ax, linewidths=linewidths) |
|
|
296 |
|
mart.curly(ax, nrid=nrid, linewidths=linewidths) |
297 |
297 |
qhull = khull.QHull(ax.sample_box, space=tri_space, incremental=False) |
qhull = khull.QHull(ax.sample_box, space=tri_space, incremental=False) |
298 |
298 |
mart.qhull_plot(ax, qhull, color="#B2B2B2", lw=lw, zorder=100) |
mart.qhull_plot(ax, qhull, color="#B2B2B2", lw=lw, zorder=100) |
299 |
299 |
mart.plot_points(ax, ms=ms, mew=mew, zorder=100500) |
mart.plot_points(ax, ms=ms, mew=mew, zorder=100500) |
File mplot/mfigs.py changed (mode: 100644) (index 633a347..2de0a0e) |
... |
... |
from matplotlib import ticker |
13 |
13 |
__all__ = [ |
__all__ = [ |
14 |
14 |
'convergence_diagram', 'convergence_legend', 'double_proxy_diagram', |
'convergence_diagram', 'convergence_legend', 'double_proxy_diagram', |
15 |
15 |
'four_branch_convergence', |
'four_branch_convergence', |
16 |
|
'double_tri_R_plot', 'double_tri_R_twins_plot', 'double_plot', |
|
|
16 |
|
'double_tri_R_plot', 'double_tri_R_twins_plot', 'double_plot', 'double_pprod_R_plot', |
17 |
17 |
'triple_plot', 'triple_wide', 'triple_wide_50_100', 'triple_plot_50_100', |
'triple_plot', 'triple_wide', 'triple_wide_50_100', 'triple_plot_50_100', |
18 |
18 |
'triple_nodes_plot', 'triple_wide_25_50', |
'triple_nodes_plot', 'triple_wide_25_50', |
19 |
19 |
'triple_plot_35_50', 'convex_plot_7', |
'triple_plot_35_50', 'convex_plot_7', |
|
... |
... |
def double_tri_R_twins_plot(fig, sample_box, space): |
104 |
104 |
ax1.sharey(ax) |
ax1.sharey(ax) |
105 |
105 |
ax.set_ybound(y_bound) |
ax.set_ybound(y_bound) |
106 |
106 |
|
|
|
107 |
|
def double_pprod_R_plot(fig, sample_box, space): |
|
108 |
|
ax1 = ax = fig.add_subplot(121) |
|
109 |
|
ax.sample_box = sample_box |
|
110 |
|
ax.space = 'R' |
|
111 |
|
try: |
|
112 |
|
tn_scheme = sample_box.Tri.tn_scheme |
|
113 |
|
except: |
|
114 |
|
import quadpy |
|
115 |
|
tn_scheme = quadpy.tn.grundmann_moeller(sample_box.nvar, 5) |
|
116 |
|
linewidths = np.array([0.7, 0.5, 0.4, 0.3, 0.2, 0.1]) / 2 |
|
117 |
|
maxes.tri_nodes_plot(ax, tri_space='R', tn_scheme=tn_scheme, nrid=2000, |
|
118 |
|
ms=1.5, mew=0.4, lw=0.35, linewidths=linewidths) |
|
119 |
|
ax.set_title(space_labels[space], pad=10) |
|
120 |
|
ax.set_xlim(0, 35) |
|
121 |
|
ax.set_ylim(0, 35) |
|
122 |
|
ax = fig.add_subplot(122) |
|
123 |
|
ax.sample_box = sample_box |
|
124 |
|
ax.space = 'G' |
|
125 |
|
maxes.tri_nodes_plot(ax, tri_space='R', tn_scheme=tn_scheme, nrid=2000, |
|
126 |
|
ms=1.5, mew=0.4, lw=0.35, linewidths=linewidths) |
|
127 |
|
ax.set_title(space_labels['G'], pad=10) |
|
128 |
|
|
107 |
129 |
def double_tri_R_plot(fig, sample_box, space): |
def double_tri_R_plot(fig, sample_box, space): |
108 |
130 |
ax1 = ax = fig.add_subplot(121) |
ax1 = ax = fig.add_subplot(121) |
109 |
131 |
ax.sample_box = sample_box |
ax.sample_box = sample_box |
|
... |
... |
def double_tri_R_plot(fig, sample_box, space): |
114 |
136 |
import quadpy |
import quadpy |
115 |
137 |
tn_scheme = quadpy.tn.grundmann_moeller(sample_box.nvar, 5) |
tn_scheme = quadpy.tn.grundmann_moeller(sample_box.nvar, 5) |
116 |
138 |
|
|
117 |
|
maxes.tri_nodes_plot(ax, tri_space='R', tn_scheme=tn_scheme) |
|
|
139 |
|
linewidths = np.array([0.7, 0.5, 0.4, 0.3, 0.2, 0.1]) / 2 |
|
140 |
|
maxes.tri_nodes_plot(ax, tri_space='R', tn_scheme=tn_scheme, nrid=2000, |
|
141 |
|
ms=1.5, mew=0.4, lw=0.35, linewidths=linewidths) |
118 |
142 |
ax.set_title(space_labels[space], pad=10) |
ax.set_title(space_labels[space], pad=10) |
119 |
143 |
ax = fig.add_subplot(122) |
ax = fig.add_subplot(122) |
120 |
144 |
ax.sample_box = sample_box |
ax.sample_box = sample_box |
121 |
145 |
ax.space = 'G' |
ax.space = 'G' |
122 |
|
maxes.tri_nodes_plot(ax, tri_space='R', tn_scheme=tn_scheme) |
|
|
146 |
|
maxes.tri_nodes_plot(ax, tri_space='R', tn_scheme=tn_scheme, nrid=2000, |
|
147 |
|
ms=1.5, mew=0.4, lw=0.35, linewidths=linewidths) |
123 |
148 |
ax.set_title(space_labels['G'], pad=10) |
ax.set_title(space_labels['G'], pad=10) |
124 |
149 |
|
|
125 |
150 |
def double_plot(fig, sample_box, space, lim=100): |
def double_plot(fig, sample_box, space, lim=100): |