Skip to content

How to give color and percentages In Neper? #579

Answered by rquey
Ali141272 asked this question in Q&A
Discussion options

You must be logged in to vote

The most direct way is to define groups (and colors) from a file. For example, for 1000 grains:

neper -T -n 1000 -domain "square(1,2)" -morpho "diameq:lognormal(1,0.1),1-sphericity:lognormal(0.1,0.03)" -dim 2 -morphooptistop "val=1e-1"
echo | awk '{for (i=0; i<1000; i++)
                 if (i < 650) {print "1"}
            else if (i < 800) {print "2"}
            else if (i < 900) {print "3"}
            else if (i < 950) {print "4"}
            else              {print "5"}}' > group
echo | awk '{for (i=0; i<1000; i++)
                 if (i < 650) {print "red"}
            else if (i < 800) {print "orange"}
            else if (i < 900) {print "yellow"}
            else if (i < 950) {…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ashokambig
Comment options

Answer selected by rquey
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants