Well, I'm planning to introduce some functionality similar to show,
building upon a rich type system.
What I have in mind is something like this:
show(::Matrix{Z}; parameters...) => Surface
show(::Matrix{Red}; parameters...) => Red channel
show(::Matrix{RGB}; parameters...) => Image
show(::Matrix{Vector2}; parameters...) => Vectorfield
show(::Vector{Y}; parameters...) => Line plot
show(::Vector{Point2D}; parameters...) => scatter plot
show(::Vector{Point3D}; parameters...) => 3D point cloud
show(::(Vector{Point3D}, Vector{Face}); parameters...) => mesh
This is nice for visual debugging, but probably not sufficient for more
complicated plots and annotations.
Am Donnerstag, 22. Januar 2015 16:42:37 UTC+1 schrieb David van Leeuwen:
>
> Hello,
>
> I've just read up on most recent conversations mentioning plotting, after
> I went through a similar install-and-try-out cycle for the various plotting
> packages.
>
> I am busy with a package named ROC <https://github.com/davidavdav/ROC>
> (Receiver
> Operating Characteristic). It is mostly about decision cost functions and
> efficiently computing ROC statistics, but there is also some support for
> making various plots related to the ROC.
>
> I do not want to decide for a potential user of this package which
> plotting package she should use. So it would be nice if there would be an
> abstract plotting API (I suppose this does not exist yet).
>
> Supposing that it is possible to make an API that includes some common
> plotting primitives, and that makes a runtime selection based on
> `isdefined(plottingpackagename)`, how would you
> - overload a function, typically `plot()`, when at module-include time it
> is not yet known which plotting package the user wants
> - specify the dependence of this package to any one of the available
> plotting packages.
>
> Thoughts?
>
> Thanks,
>
> ---david
>