GR.jl plotting enhancements

303 views
Skip to first unread message

Josef Heinen

unread,
Feb 29, 2016, 5:54:15 AM2/29/16
to julia-users
I finally found some time to upgrade the GR framework. It can now be used as a further alternative backend for Plots.jl, a wrapper for several plotting packages. The results can be seen here. In addition there are now also several convenience functions allowing to use GR quite similar to MATLAB's plot functions.

So, with the recent version, there's even more interoperability with different plotting environments, e.g.
  • use GR as a backend for Matplotlib (Demos)
  • use GR as a backend for Plots.jl (Demo)
  • user interaction by means of Interact.jl (Demo)
  • use GR native MATLAB-like plot functions (Link)
The latter is still incomplete, but I will add more  functions ASAP.

May be, there is also a chance to combine GR with Simon's powerful GLvisualize.jl library - we are open to anything.

Steven Schmidt

unread,
Mar 1, 2016, 7:19:12 PM3/1/16
to julia-users
Quick question on GR usage.

I'd like to be able to plot multiple plots on the same figure with multiple commands (in Julia)

Currently this works:

plot(t,BezierBasis(1,order,knot_v,t),"b",t,BezierBasis(2,order,knot_v,t),"b")

But what I'd like to do is this:

for i = 1:length(knot_v)
    plot(t,BezierBasis(i,order,knot_v,t),"b")
end

In MATLAB there was a command "hold on" to do this.  Is there a way to do this yet in GR?

Thanks!

-Steven

Josef Heinen

unread,
Mar 2, 2016, 3:51:03 AM3/2/16
to julia-users

I added a hold() function. So, the following script should work now as expected. I will make a new pull requests on Friday - but you're free to checkout the master branch using Pkg.checkout("GR").


Reply all
Reply to author
Forward
0 new messages