It seems there's two levels where things could be standardized, for me a
good plotting API primarily need to provide good primitives: dot, line,
rectangle, ellipse, patch, text, ...
I don't know if those could be standardized so that plotting methods could
be written in a rendering back-end ind
Thanks for all the suggestions---the Require package is probably what I go
for now. Looking at Sims.jl, it is probably not the most fun implementing
the various plots I want to make in the many plotting environments
available in Julia, the least of which are to get all those environments
work
Sims.jl uses the Requires.jl approach that Matt mentioned. There are a few
helper plotting methods that are optional depending on what packages the
user loads:
https://github.com/tshort/Sims.jl/blob/master/src/utils.jl#L158-L181
https://tshort.github.io/Sims.jl/plotting/
On Thu, Jan 22, 2015 a
I've thought some about this in the past, too. Coming from Matlab, I've
imagined a Matlab-esque Base.Plots module that has just a handful of
definitions, mirroring the IO system:
abstract AbstractPlot
immutable NoPlots <: AbstractPlot end
STDPLOT = NoPlots() # When a plotting package loads, it
The reference does seem to fit here, as a general plotting language seems
to be awfully complicated.
By the way, I totally forgot to mention, that I want to turn GLPlot more
into a meta package, offering different plotting interfaces, since I'm
generalizing more and more of the render code and
I don't know if it is a good idea or not, but using the `Requires` package
is one way to do this. That package's `@require` macro lets you define
functions when another package is loaded, such as a plotting package. A
pattern like this can be used:
using Requires
Requires.@require PyPlot begin
The issue now is that there are several plotting packages, each with
advantages and disadvantages, forcing users to make a choice often from
limited information. I'm afraid defining another plotting API in Base,
rather than simplifying the matter, will just create another choice you'll
have to
Hello,
On Thursday, January 22, 2015 at 5:13:05 PM UTC+1, Simon Danisch wrote:
>
> 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(::
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