jcrist / Old-Control.jl

Development has been moved to https://github.com/JuliaControl/Control.jl
8 stars 0 forks source link

Choosing a plotting library #2

Open jcrist opened 10 years ago

jcrist commented 10 years ago

A plotting library needs to be chosen for use with any of the commands that generate plots. Ideally this would work in both the standard REPL, as well as IJulia. Possible contenders:

My vote is for winston, if at all possible. It's syntax is much closer to what I'm used to (pyplot, or matlab), and has the advantage of no python dependency. Gadfly makes pretty plots as well. And Pyplot uses matplotlib, which is very mature and tested. Unless someone can provide a good argument, I think gaston is out. Depending on gnuplot seems unnecessary at this point.

Thoughts?

ufechner7 commented 10 years ago

Winston is the cleaner solution, but it still lacks some important features like zoom and pan interactively. I would vote for supporting both Winston and PyPlot. PyPlot is more powerfull, but also more difficult to install.

jcrist commented 10 years ago

I think support will initially be planned for winston, with pyplot added in later as an alternative. The best way I can think of generalizing functions based on graphing library is to have import time checks. For example (pseudocode):

if isinstalled(winston)
    import winston_graphing: function names using winston for plotting
elseif isinstalled(pyplot)
    import pyplot_graphing: function names using pyplot for plotting
else
    throw(some error)
end

As long the interfaces for each plotting library functionality were the same, this would be transparent to the user. There are probably better ways though.