Skip to content

The command like "subplot"doesn't work #310

Open

Description

@Loong99
plt::plot(t3, p3);
plt::subplot(2, 2, 1);
plt::title("p-t");
plt::xlabel("t/ms");
plt::ylabel("p/Mpa");

plt::plot(t3, p3);
plt::subplot(2, 2, 2);
plt::title("p-t");
plt::xlabel("t/ms");
plt::ylabel("p/Mpa");

plt::plot(t3, p3);
plt::subplot(2, 2, 3);
plt::title("p-t");
plt::xlabel("t/ms");
plt::ylabel("p/Mpa");

plt::plot(t3, p3);
plt::subplot(2, 2, 4);
plt::title("p-t");
plt::xlabel("t/ms");
plt::ylabel("p/Mpa");

It doesn't work well above, but work well below.
plt::figure(1);
plt::plot(t3, p3);
plt::title("p-t");
plt::xlabel("t/ms");
plt::ylabel("p/Mpa");
plt::figure(2);
plt::plot(l3, p3);
plt::title("p-l");
plt::xlabel("l/dm");
plt::ylabel("p/Mpa");
plt::figure(3);
plt::plot(t3, v3);
plt::title("v-t");
plt::xlabel("t/ms");
plt::ylabel("v/(m/s)");
plt::figure(4);
plt::plot(l3, v3);
plt::title("v-l");
plt::xlabel("l/dm");
plt::ylabel("v/(m/s)");
plt::show();

Activity

  1. ykachin commented on May 28, 2022

    @ykachin

    you can change the subplot function code:

    PyTuple_SetItem(args, 0, PyLong_FromLong(nrows));
    PyTuple_SetItem(args, 1, PyLong_FromLong(ncols));
    PyTuple_SetItem(args, 2, PyLong_FromLong(plot_number));

  2. eduardobehr commented on Feb 14, 2023

    @eduardobehr

    Too bad this repository isn't updated since 2021.
    @lava could you merge PR #333 to fix this issue?

  3. added a commit that references this issue on Jul 31, 2023
    6b245b6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions