Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is my example code with plt.show() not working? #42

Open
schittli opened this issue Jul 25, 2023 · 0 comments
Open

Why is my example code with plt.show() not working? #42

schittli opened this issue Jul 25, 2023 · 0 comments

Comments

@schittli
Copy link

Good evening

thank you very much for sharing your great work!,
it's very useful to be able to have the flexibility of patchworklib.

Unfortunately, I have not found any example which uses patchworklib and displays the result on the screen (without saving it as an image on the disk and displaying this image) and I was not able to get it running 😞:

import matplotlib.pyplot as plt
import patchworklib as pw

# Create the Brick-Objects
brick1 = pw.Brick("11", figsize=(3,3))
brick2 = pw.Brick("12", figsize=(3,3))
brick3 = pw.Brick("21", figsize=(3,3))
# Draw to plots
brick1.plot(data=[1, 2, 3, 4], label="Brick 1")
brick2.plot(data=[5, 6, 7, 8], label="Brick 2")
brick3.plot(data=[9, 10, 11, 12], label="Brick 3")

# Create the design
line1 = pw.hstack(brick1, brick2)
diagramm = pw.vstack(line1, brick3)

# Plot the diagram in the Screen
plt.show()

Does anyone has an idea what's wrong in my code?

Thanks a lot for any help in advance,
kind regards, Thomas

@schittli schittli changed the title Why does my example code with plt.show() not working? Why is my example code with plt.show() not working? Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant