Can someone please update Winston?

594 views
Skip to first unread message

K leo

unread,
Aug 26, 2016, 6:04:22 PM8/26/16
to julia...@googlegroups.com
so that it works with version 0.5.

Chris Rackauckas

unread,
Aug 26, 2016, 8:19:45 PM8/26/16
to julia-users
You should really check out Plots.jl. It's a plotting metapackage which lets you use the same plot commands to use any backend. It's nice because if you're using it an one package stops getting updated, you can switch to another plotting backend without changing your plot commands.

But I can see that, although Winston hasn't been tagged in almost a year, there has been some development work. Have you tried Pkg.checkout("Winston")?

K leo

unread,
Aug 27, 2016, 8:15:27 PM8/27/16
to julia-users
Thanks for the reply.

I did try Plots.jl, and it appears all plots go to a browser window.  I would still prefer plots have their own private window with sizes under control.  Am I missing anything?

Pkg.checkout("Winston") doesn't get me anything new.

Chris Rackauckas

unread,
Aug 27, 2016, 8:19:47 PM8/27/16
to julia-users
Plots.jl has different behavior depending on the chosen backend. It defaults to Plotly, which is why it opened in the browser. However, for plots which open in their own window, you can try installing PyPlot, GR, PlotlyJS, etc.: just checkout the backend page: https://juliaplots.github.io/backends/.

I would recommend giving the PyPlot backend for Plots a try. 

Henri Girard

unread,
Aug 28, 2016, 2:16:38 AM8/28/16
to julia...@googlegroups.com

If you like windows (I don't) there is a promising new julia 2D plotting (link : https://groups.google.com/forum/#!topic/julia-users/by8YlsmRnHg) very new but nice graphics.

Plots is really an excellent plotting, with all backends that can make you external plotting.

Andreas Lobinger

unread,
Aug 29, 2016, 8:34:08 AM8/29/16
to julia-users
Hello colleague,


On Saturday, August 27, 2016 at 12:04:22 AM UTC+2, K leo wrote:
so that it works with version 0.5.

could you please list/report what errors you get? Do you use Tk or Gtk? I looked a little bit around yesterday (with Gtk) and it looks like plotting does work, but not displaying in a window.


Daniel Carrera

unread,
Aug 29, 2016, 9:54:44 AM8/29/16
to julia-users
Plots.jl is a good idea, but the backends are not really swappable. You can get a fairly different plot if you swap the backend.

Daniel Carrera

unread,
Aug 29, 2016, 10:01:18 AM8/29/16
to julia-users
I currently use PyPlot. It has a lot going for it, as it is the most mature plotting package for Julia right now (thanks to Matplotlib). I don't use Plots.jl right now because I am happier using PyPlot directly. I like the API better, and I have more control because I have a way to issue any command that you could issue with Python.

Chris Rackauckas

unread,
Aug 29, 2016, 10:07:34 AM8/29/16
to julia-users
This isn't the thread for this, but I'll bite.

That's exactly the reason why it's a good idea. The backends aren't swappable, but the code is. And for the most part that means you can just avoid the cons of any backend instead of having to fight against them. You could be making all of your plots with the PGFPlots backend for some publication, and then realize that you need a trisurf plot. You can just switch the backend and re-save your plots without actually writing new code, and now they can be all saved and matching in PyPlot.

Another example is when you run into issues with precision. PyPlot is a good standard choice, so I was using it to show all of my convergence test results. However, once I started testing things like Order 10 Runge-Kutta methods I noticed PyPlot simply can't plot values that are below 1e-30. The quick fix is to just change the backend, i.e. add the one line of code `plotly()`, and now all of the convergence tests how nice plots that work in their range.  

This is not to mention that Plots adds features to each backend. Since it's not focused on making the graphic backend, it's just focused on making "recipes" which are convenient commands for doing things like making a scatter plot matrix, and will work for any backend. So sure you can't use every feature of every backend, but there are more features you can easily use through Plots than just using the backend itself. That said, it's still a young package so there are places where it needs to wrap more of the backend, like with trisurfs you need to be able to specify triangles. But Tom is working on that.

Tom Breloff

unread,
Aug 29, 2016, 10:15:31 AM8/29/16
to julia-users
The important points of this thread:

  • There hasn't been a tag in a year for Winston, but there have been fixes, including from Jeff and Stefan.  Check out master and try again
  • You might consider other packages, because there's lots of options out there
  • Chris REALLY wants to specify his own triangles ;)

Daniel Carrera

unread,
Aug 29, 2016, 10:26:44 AM8/29/16
to julia...@googlegroups.com
On 29 August 2016 at 16:07, Chris Rackauckas <rack...@gmail.com> wrote:
That's exactly the reason why it's a good idea. The backends aren't swappable, but the code is. And for the most part that means you can just avoid the cons of any backend instead of having to fight against them. You could be making all of your plots with the PGFPlots backend for some publication, and then realize that you need a trisurf plot. You can just switch the backend and re-save your plots without actually writing new code, and now they can be all saved and matching in PyPlot.

Wait... doesn't your example imply that the code is *not* quite swappable? If you start with PyPlot and use a trisurf plot, you cannot switch to PGFPlots. I don't want to be too critical. I think Thomas knows that I'm cheering for him from the benches. I totally agree that changing one line from "pyplot()" to "gr()" is infinitely easier than learning GR.jl if you know PyPlot.jl. The main reason I don't use Plots.jl is entirely a personal preference regarding the API.

 
This is not to mention that Plots adds features to each backend.


Yeah, but I worry that it will take away features from each backend.

 
So sure you can't use every feature of every backend, but there are more features you can easily use through Plots than just using the backend itself.

Can you give me an example of one of the plotting recipes that Plots adds that you have found useful?

I check on Plots from time to time but I'm afraid to make the switch. I know PyPlot already, it does what I need, and plotting is pretty important for my daily work.

Cheers,
Daniel.

Sisyphuss

unread,
Aug 29, 2016, 5:13:34 PM8/29/16
to julia-users


On Monday, August 29, 2016 at 4:26:44 PM UTC+2, Daniel Carrera wrote:
On 29 August 2016 at 16:07, Chris Rackauckas <rack...@gmail.com> wrote:
That's exactly the reason why it's a good idea. The backends aren't swappable, but the code is. And for the most part that means you can just avoid the cons of any backend instead of having to fight against them. You could be making all of your plots with the PGFPlots backend for some publication, and then realize that you need a trisurf plot. You can just switch the backend and re-save your plots without actually writing new code, and now they can be all saved and matching in PyPlot.

Wait... doesn't your example imply that the code is *not* quite swappable? If you start with PyPlot and use a trisurf plot, you cannot switch to PGFPlots. I don't want to be too critical. I think Thomas knows that I'm cheering for him from the benches. I totally agree that changing one line from "pyplot()" to "gr()" is infinitely easier than learning GR.jl if you know PyPlot.jl. The main reason I don't use Plots.jl is entirely a personal preference regarding the API.

I think Tom may have a more primitive API underneath. If that's the case, someone may write a PyPlot-style API for Plots.jl.

K leo

unread,
Aug 29, 2016, 8:24:05 PM8/29/16
to julia-users
I am not sure how it worked for you.  I got error messages when I try to use it:

julia> using Winston
ERROR: LoadError: syntax: space before "(" not allowed in "AbstractVecOrMat{T} ("
 in include_from_node1(::String) at ./loading.jl:426
 in eval(::Module, ::Any) at ./boot.jl:234
 in require(::Symbol) at ./loading.jl:357
while loading /home/xxxx/.julia/v0.5/Winston/src/Winston.jl, in expression starting on line 96

K leo

unread,
Aug 29, 2016, 8:25:32 PM8/29/16
to julia-users
With this version of Julia:

  | | |_| | | | (_| |  |  Version 0.5.0-rc3+0 (2016-08-22 23:43 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-unknown-linux-gnu

Devin Kilminster

unread,
Aug 30, 2016, 1:26:29 AM8/30/16
to julia-users
I agree with everyone who's saying you should look at Plots.jl, but if for now you must use Winston, you might have luck with the version I forked and hacked to make run on 0.5:

Pkg.clone("g...@github.com:MetServiceDev/Tk.jl.git")
Pkg.clone("g...@github.com:MetServiceDev/Winston.jl.git")

I don't want to be maintaining the above for any length of time, so we're transitioning to Plots.jl.

Also as Chris Rackauckas has said there has been some development work, so hopefully, that will work.

K leo

unread,
Sep 3, 2016, 5:56:46 PM9/3/16
to julia-users
I am sorry, but what does the following mean:

julia> Pkg.clone("g...@github.com:MetServiceDev/Winston.jl.git")
INFO: Cloning Winston from g...@github.com:MetServiceDev/Winston.jl.git
Private key location for 'g...@github.com':
Public key location for 'g...@github.com' [.pub]:
WARNING: Private key not found
Passphrase for :
ERROR: GitError(Code:ERROR, Class:SSH, Failed to authenticate SSH session: Unable to open public key file)
 in macro expansion at ./libgit2/error.jl:99 [inlined]
 in clone(::String, ::SubString{String}, ::Base.LibGit2.CloneOptions) at ./libgit2/repository.jl:191
 in #clone#109(::String, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractCredentials}, ::Function, ::String, ::SubString{String}) at ./libgit2/libgit2.jl:327
 in clone(::String, ::SubString{String}) at ./pkg/entry.jl:195
 in clone(::String) at ./pkg/entry.jl:221
 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}})() at ./pkg/dir.jl:31
 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}}, ::String) at ./file.jl:59
 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at ./pkg/dir.jl:31
 in clone(::String) at ./pkg/pkg.jl:151

Chris Rackauckas

unread,
Sep 3, 2016, 6:13:16 PM9/3/16
to julia-users
Try this instead: Pkg.clone("https://github.com/MetServiceDev/Winston.jl.git") That error just means you didn't setup Git to have a private key, so using the SSH protocol won't work. 

Andreas Lobinger

unread,
Sep 4, 2016, 1:59:44 AM9/4/16
to julia-users
btw:

i'm running this now with the MetServiceDev/Tk.jl (actually only a small change) only and Winston from master in 0.5-rc3 sucessfully. For Winston/Gtk there is an Gtk issue opened.

Reply all
Reply to author
Forward
0 new messages