-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
Plots not appearing #1359
Comments
A plot is automatically displayed when it's returned. Otherwise, e.g. in your example in a file, you can use |
@daschw, I am facing same exact issue as OP and your proposed solution did not help using Julia 1.1.0 on Ubuntu 18.04. Julia plots only display in a separate window at command line inside the I attempted setting backend with |
Oh, I think, I did not correctly understand the issue in the first place. |
Thanks, @daschw, both suggestions work! |
I have the same problem. And I think it is inefficient to save the figure and check it out. So I hope this problem can be solved recently. |
I agree. That's why I suggest working interactively in the REPL or in Juno.
As I wrote above, if you execute |
@daschw Yeah, you explained it clearly. And I did it successfully. Thanks for your sharing! The command will keep the julia window remains open. And the figure will show. Also, I was wandering if it can be done with shell script without run julia in terminal. All the problem is about how to send a command to the REPL. Just like that(in |
@daschw I try the following script. But it quit immediately, too. 😂
|
@daschw Also, I have a question about how to use |
To prevent julia from exiting immediately, add |
@mkitti thanks for the answer, that's the expected behavior. Running |
|
readline() |
When I am trying to execute the following code t2.jl
using Plots
f(x) = exp(-x^2/2)
plot(f, -3, 3)
by typing
julia t2.jl
in the terminal, nothing is visualised.But the same thing through Julia command line(or an IJulia notebook)
julia> using Plots
julia> f(x) = exp(-x^2/2)
f (generic function with 1 method)
julia> plot(f, -3, 3)
The plot visualises fine in both of the cases.
Can anyone help regarding this?
I am using julia 0.6.0
The text was updated successfully, but these errors were encountered: