WebRTC Xamarin Binding для iOS - обернуть библиотеку Objective C или C ++?

Без sharex=True, sharey=True вы получите:

enter image description here [/g0]

С его помощью вы должны получить его лучше:

fig, axes2d = plt.subplots(nrows=3, ncols=3,
                           sharex=True, sharey=True,
                           figsize=(6,6))

for i, row in enumerate(axes2d):
    for j, cell in enumerate(row):
        cell.imshow(np.random.rand(32,32))

plt.tight_layout()

enter image description here [/g1]

Но если вы хотите добавить дополнительные метки, вы должны добавить их только к графикам:

fig, axes2d = plt.subplots(nrows=3, ncols=3,
                           sharex=True, sharey=True,
                           figsize=(6,6))

for i, row in enumerate(axes2d):
    for j, cell in enumerate(row):
        cell.imshow(np.random.rand(32,32))
        if i == len(axes2d) - 1:
            cell.set_xlabel("noise column: {0:d}".format(j + 1))
        if j == 0:
            cell.set_ylabel("noise row: {0:d}".format(i + 1))

plt.tight_layout()

enter image description here [/g2]

Добавление метки для каждого графика испортит ее (возможно, есть способ автоматически обнаруживать повторяющиеся метки, но я не знаю об этом).

2
задан p10ben 17 January 2019 в 07:37
поделиться