diagrams / diagrams-contrib

User-contributed extensions to diagrams
BSD 3-Clause "New" or "Revised" License
27 stars 31 forks source link

Swimunit 0.2.0.261 initium #55

Open wherkendell opened 8 years ago

wherkendell commented 8 years ago

swimunit

Swimunit will become a versatile plotting library. It will be possible to stack plot elements like lego pieces. E.g.

plot # centerXY <> grid # centerXY

with

grid :: Diagram B grid = ( verticlabel vml1 0.3 # fc lime ||| ( verticticks vmt1 0.4 ( 0.0) # lc lime <> verticticks vit1 0.2 (-1.0) # lc green <> verticaxis 8.5 # lc white ) ||| verticgrid vmt1 8.5 # lc blue )

plot :: Diagram B plot = ( ploticon xy1 (circle 0.1 # fc blue # lc aqua) <> plotline xy1 # lc aqua )

plots lines and points over a grid. See example below. plot

In addition a cool Dotmatrix font can render arbitrary strings as if displayed on an old dotmatrix panel. dotmatrix

byorgey commented 8 years ago

Hi @wherkendell, this is very cool indeed! However, I think there was some misunderstanding. I do not think you should add your entire swimunit plotting library to diagrams-contrib. Instead, you should release it as its own independent package(s). Based on our discussion I thought you were going to put just the dot-matrix font stuff in diagrams-contrib, since that part is more generally useful to other users of diagrams.

cchalmers commented 8 years ago

I agree, the dot-matrix stuff would be a nice addition to contrib but plotting library should probably be in its own package.

wherkendell commented 8 years ago

Hi Chris,

I really would love to have the plotting library in an own package! But this is something I can not decide.

Dotmatrix can render texts under any circumstances it might be a good idea to use it as a standard means to dump debug, info, warn and error messages directly into diagrams wherever the user likes. My idea is that the plotting library can put error messages directly in the plot if for example the scaling is totally wrong. So maybe Dotmatrix should be put somewhere where everybody can access it.

On 18.09.2015 20:11, Chris wrote:

I agree, the dot-matrix stuff would be a nice addition to |contrib| but plotting library should probably be in its own package.

— Reply to this email directly or view it on GitHub https://github.com/diagrams/diagrams-contrib/pull/55#issuecomment-141522799.

cchalmers commented 8 years ago

Everyone can access Dotmatrix when it's on diagrams-contrib. It's fine to add diagrams-contrib as a dependency to your plotting library. A lot of people will already have it because it comes as standard when you do a cabal install diagrams.

wherkendell commented 8 years ago

Hi Brent,

Thank you very much. You are right. Obviously no one can now, that Dotmatrix is an integral part of swimunit. I started to implement a plotting library and during that I created a package (for debugging) far more interesting to others than the original package itself. As I already wrote to Chris I could imagine that for debugging and/or fun purposes Dotmatrix could be of general interest.

Summarizing: a) Dotmatrix should go to contrib b) Swimunit should go to an own package

That's fine for me. Thanks for support.

Regards Wolfram

On 18.09.2015 18:14, Brent Yorgey wrote:

Hi @wherkendell https://github.com/wherkendell, this is very cool indeed! However, I think there was some misunderstanding. I do not think you should add your entire swimunit plotting library to |diagrams-contrib|. Instead, you should release it as its own independent package(s). Based on our discussion I thought you were going to put just the dot-matrix font stuff in |diagrams-contrib|, since that part is more generally useful to other users of diagrams.

— Reply to this email directly or view it on GitHub https://github.com/diagrams/diagrams-contrib/pull/55#issuecomment-141496248.

wherkendell commented 8 years ago

Hi Chris,

okay. That's good to hear. It is exactly what I would like to see because if so I can rely in my plotting package on contrib to access Dotmatrix for error messaging and debugging.

If no one is complaining Dotmatrix will go to contrib as package "Dotmatrix".

On 18.09.2015 21:35, Chris wrote:

Everyone can access Dotmatrix when it's on |diagrams-contrib|. It's fine to add |diagrams-contrib| as a dependency to your plotting library. A lot of people will already have it because it comes as standard when you do a |cabal install diagrams|.

— Reply to this email directly or view it on GitHub https://github.com/diagrams/diagrams-contrib/pull/55#issuecomment-141547084.