Greyscale bars/Display: Difference between revisions
Content added Content deleted
m ({{omit from|Lilypond}}) |
|||
Line 539: | Line 539: | ||
Resulting [http://www.diga.me.uk/greyscale.gif GreyScale image] without the outlines. |
Resulting [http://www.diga.me.uk/greyscale.gif GreyScale image] without the outlines. |
||
=={{header|Mathematica}}== |
|||
<lang mathematica>CreateDocument[ Graphics[ Flatten@Table[ |
|||
{ If[EvenQ[#3], GrayLevel[ 1. - j/#1 ], GrayLevel[ j/#1 ]], |
|||
Rectangle[{j #2, 7*#3}, {#2 (j + 1), (#3 + 1) 7}]}, {j, 0, #1}] & @@@ |
|||
{{7, 8, 3}, {15, 4, 2}, {31, 2, 1}, {63, 1, 0} } |
|||
,ImageSize -> Full], WindowFrame -> "Frameless", WindowSize -> Full]</lang> |
|||
[[File:greyscales.jpg]] |
|||
=={{header|OCaml}}== |
=={{header|OCaml}}== |
||