Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swimunit 0.2.0.261 initium #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wherkendell
Copy link

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
Copy link
Member

byorgey commented Sep 18, 2015

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
Copy link
Member

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

@@ -0,0 +1,843 @@
{-# LANGUAGE NoMonomorphismRestriction #-}

module Diagrams.Swimunit.Dotmatrix
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would Diagrams.TwoD.DotMatrix be more consistent with other modules names?

Also remember to add this to diagrams-contrib.cabal.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Chris,
concerning the TwoD package I can not tell. But personally I would like
to keep Dotmatrix as the emphasis is neither on dot nor on matrix, its
the combination of both and therefore the two nouns should not be
separated by a Camel.
But: If community naming rules are different I will comply to these.

Regards
Wolfram

On 18.09.2015 20:13, Chris wrote:

In src/Diagrams/Swimunit/Dotmatrix.hs
#55 (comment):

@@ -0,0 +1,843 @@
+{-# LANGUAGE NoMonomorphismRestriction #-}
+
+module Diagrams.Swimunit.Dotmatrix

Would |Diagrams.TwoD.DotMatrix| be more consistent with other modules
names?

Also remember to add this to |diagrams-contrib.cabal|.


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

@wherkendell
Copy link
Author

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
#55 (comment).

@cchalmers
Copy link
Member

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
Copy link
Author

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
#55 (comment).

@wherkendell
Copy link
Author

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
#55 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants