-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Updating labels in plot! #27
Comments
It would also be nice if you could only set the labels without plotting anything extra, for example p = plot(rand(10))
plot!(;xlabel="label") |
Yeah this should be possible with most backends. I see you're using pyplot, so I'll handle that first. I'll also add shorthands 'xlabel!()', etc. I should be able to do this today.
|
I'm a little confused what you're trying to do. |
Sorry, I understand your confusion, I should have explained better. I am writing a package where the resulting data is a bit messy to extract from the type. To facilitate plotting of the results I therefore extend the However, the problem has nothing to do with this, it is just that with certain backends like Immerse, Gadfly, Winston I get no output in IJulia. An example which does not contain any of my own code: |
Ah I see, so it's just not displaying in IJulia. Ok I need to look into that... I don't actually use IJulia at all, but I know others do, so I want that to work as expected. |
Just installed IJulia, so I'll investigate further. However, does it work if you do:
|
Cool! That works beautifully for Gadfly and Immerse (Immerse opens a new window but I guess this is to expect since it has the GUI functionality). For Winston (works with LoadError: MethodError: `display` has no method matching display(::Gtk.GtkCanvas, ::Winston.FramedPlot)
Closest candidates are:
display(!Matched::AbstractString, ::Any)
display(!Matched::TextDisplay, ::Any)
display(!Matched::MIME{mime}, ::Any)
... |
Ok thanks. I'll look into Winston, but I suspect that IJulia calls a On Tue, Sep 22, 2015 at 11:08 AM, Kristoffer Carlsson <
|
By the way, this works on the development branch, and I'll push it to master once I finish with a display/writemime re-write.
|
Both the original labels/title request, and the IJulia display issues should all be fixed now on latest master. Please try it out. |
Works great! Thanks! |
Cool! If there's anything that's not easy or intuitive, please let me On Wed, Sep 23, 2015 at 10:00 AM, Kristoffer Carlsson <
|
Thanks... I'll look into PyPlot's double-display. As for UnicodePlots, that's more of a REPL plotting tool... I'm actually surprised it does anything even remotely good in IJulia! |
Also one additional comment... unless you need the plot reference
you can do:
Plots keeps track of the "current plot" for you, and when you leave it out it will automatically update the current plot. |
I pushed to master. The pyplot double-show issue is still there, and is not an immediately easy solution. The pyplot code is a little hacky to get it to work in IJulia, and the figure seems to be displayed at various stages of the building process, and not after the plot method returns. It works fine at the REPL, so I need to pour through Steven's code a little more to understand what he's doing for IJulia. |
closing for more specific issue #29 |
Is there anyway in which you could specify the labels in not only the first plot. As an example:
The x-label defined in the second plot command is not shown.
The text was updated successfully, but these errors were encountered: