hplgit / scitools

Additional scientific computing functionality in Python - extensions to NumPy/SciPy++
http://hplgit.github.io/scitools/doc/web/index.html
Other
64 stars 30 forks source link

plot does not show inline #40

Open RobertMZ opened 8 years ago

RobertMZ commented 8 years ago

If one uses the plot function of scitools, it does not show the plot (even with the raw_input(' ')), but it can save the figure as a pdf.

johannesring commented 8 years ago

Which backend are you using?

RobertMZ commented 8 years ago

backend is the matplotlib; if I import plot from matplotlib everything works fine.

jacobsca commented 6 years ago

I have exactly the same problem. I am (very) puzzled.

I installed scitools from https://github.com/hplgit/scitools and it loads fine. I ran the diagnostics and all fine. I can run matplotlib - all fine.

I cannot see the plot. I can save it as eps or pdf - fine.

Help?

johannesring commented 6 years ago

You can fix this by calling the show function on the matplotlib backend object, like in this example:

from scitools.std import *
x = linspace(0, 2*pi, 101)
y = sin(x)
plot(x, y)
show()
g = get_backend()
g.show()
raw_input('press enter')
jacobsca commented 6 years ago

Works! Thanks. Clas A. Jacobson

jacobsonclas@sbcglobal.net

  From: Johannes Ring <notifications@github.com>

To: hplgit/scitools scitools@noreply.github.com Cc: jacobsca jacobsonclas@sbcglobal.net; Comment comment@noreply.github.com Sent: Thursday, August 9, 2018 3:09 AM Subject: Re: [hplgit/scitools] plot does not show inline (#40)

You can fix this by calling the show function on the matplotlib backend object, like in this example:from scitools.std import x = np.linspace(0, 2pi, 101) y = np.sin(x) plot(x, y) show() g = get_backend() g.show() raw_input('press enter')— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

jacobsca commented 6 years ago

Johannes Sorry for what may seem like a (very) dumb question. My dolfin under 2.7 has disappeared. I have a dolfin under python3 but the entire fenics under 2.7 has gone. I'm not at all sure why. How can I get it back? I use python 2.7 almost exclusively...I'm not sure what happened? Clas  Clas A. Jacobson1010 Horizon WayCT 06084 860 783 0074 (home) jacobsonclas@sbcglobal.net

  From: Johannes Ring <notifications@github.com>

To: hplgit/scitools scitools@noreply.github.com Cc: jacobsca jacobsonclas@sbcglobal.net; Comment comment@noreply.github.com Sent: Thursday, August 9, 2018 3:09 AM Subject: Re: [hplgit/scitools] plot does not show inline (#40)

You can fix this by calling the show function on the matplotlib backend object, like in this example:from scitools.std import x = np.linspace(0, 2pi, 101) y = np.sin(x) plot(x, y) show() g = get_backend() g.show() raw_input('press enter')— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.