Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/intpic/doc/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 30.7.2024 mit Größe 11 kB image not shown  

Quelle  colors.xml   Sprache: XML

 
<?xml version="1.0" encoding="UTF-8"?>

<Chapter Label="colors">
  <Heading>
    The colors in the <Package>IntPic</Package> package
  </Heading>
  <!--<Index>&IntPic; - colors</Index>--> 
  
  The idea in what concerns the colors is the following: the reader is free to
  choose his colors (taking into account that the latex <Package>xcolor</Package> package is
  used), but we try to make users life reasonably easy. He is allowed to choose
  tones. The default colors used by &IntPic; are not many, although (from our
  experience) sufficient for most examples. 
<!--Furthermore, we have functions that, especially when only a few of
  the available colors are used, chose quite different colors.-->

  <Section>
    <Heading>Colors by tones</Heading>
The colors are divided by tones.
<!--    <Subsection>
      <Heading>Tones</Heading>-->

       <Listing Type="red"><![CDATA[
gap> IP_ColorsRedTones; #red
"red""red!50""red!20""red!80!green!50""red!80!blue!60" ]
]]></Listing>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[scale=1.2]{../images/red_tones.pdf}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/red_tones.jpg"></center><br>
      </Alt>
       <Listing Type="green"><![CDATA[
gap> IP_ColorsGreenTones; #green
"green""green!50""green!20""green!80!red!50""green!80!blue!60" ]
]]></Listing>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[scale=1.2]{../images/green_tones.pdf}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/green_tones.jpg"></center><br>
      </Alt>
       <Listing Type="blue"><![CDATA[
gap> IP_ColorsBlueTones; #blue
"blue""blue!50""blue!20""blue!80!red!50""blue!80!green!60" ]
]]></Listing>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[scale=1.2]{../images/blue_tones.pdf}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/blue_tones.jpg"></center><br>
      </Alt>
       <Listing Type="cyan"><![CDATA[
gap> IP_ColorsCompRedTones; # cyan (complement of red)
"-red""-red!50""-red!20""-red!80!green!50""-red!80!blue!60" ]
]]></Listing>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[scale=1.2]{../images/comp_red_tones.pdf}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/comp_red_tones.jpg"></center><br>
      </Alt>
       <Listing Type="magenta"><![CDATA[
gap> IP_ColorsCompGreenTones; # magenta (complement of green)
"-green""-green!50""-green!20""-green!80!red!50""-green!80!blue!60" 
 ]
]]></Listing>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[scale=1.2]{../images/comp_green_tones.pdf}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/comp_green_tones.jpg"></center><br>
      </Alt>
       <Listing Type="yellow"><![CDATA[
gap> IP_ColorsCompBlueTones; # yellow (complement of blue)
"-blue""-blue!50""-blue!20""-blue!80!red!50""-blue!80!green!60" ]
]]></Listing>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[scale=1.2]{../images/comp_blue_tones.pdf}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/comp_blue_tones.jpg"></center><br>
      </Alt>
       <Listing Type="dark gray"><![CDATA[
gap> IP_ColorsDGrayTones; # dark gray
"black!80""black!70""black!60""black!50""black!40" ]
]]></Listing>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[scale=1.2]{../images/dark_gray_tones.pdf}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/dark_gray_tones.jpg"></center><br>
      </Alt>
       <Listing Type="light gray"><![CDATA[
gap> IP_ColorsLGrayTones; # light gray
"black!30""black!25""black!20""black!15""black!10" ]
]]></Listing>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[scale=1.2]{../images/light_gray_tones.pdf}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/light_gray_tones.jpg"></center><br>
      </Alt>
</Section>
    <Section>
      <Heading>Lists of colors</Heading>
       <Listing Type="array of colors by tones"><![CDATA[
gap> ListsOfIP_Colors;
[ [ "red""red!50""red!20""red!80!green!50""red!80!blue!60" ], 
  [ "green""green!50""green!20""green!80!red!50""green!80!blue!60" ], 
  [ "blue""blue!50""blue!20""blue!80!red!50""blue!80!green!60" ], 
  [ "-red""-red!50""-red!20""-red!80!green!50""-red!80!blue!60" ], 
  [ "-green""-green!50""-green!20""-green!80!red!50"
      "-green!80!blue!60" ], 
  [ "-blue""-blue!50""-blue!20""-blue!80!red!50""-blue!80!green!60" ],
  [ "black!80""black!70""black!60""black!50""black!40" ], 
  [ "black!30""black!25""black!20""black!15""black!10" ] ]
]]></Listing>
       <Listing Type="list of colors by tones"><![CDATA[
gap> IP_Colors;
"red""red!50""red!20""red!80!green!50""red!80!blue!60""green"
  "green!50""green!20""green!80!red!50""green!80!blue!60""blue"
  "blue!50""blue!20""blue!80!red!50""blue!80!green!60""-red"
  "-red!50""-red!20""-red!80!green!50""-red!80!blue!60""-green"
  "-green!50""-green!20""-green!80!red!50""-green!80!blue!60""-blue"
  "-blue!50""-blue!20""-blue!80!red!50""-blue!80!green!60""black!80"
  "black!70""black!60""black!50""black!40""black!30""black!25"
  "black!20""black!15""black!10" ]
]]></Listing>
    </Section>
    <Section>
      <Heading>The <Package>IntPic</Package> default list of colors</Heading>
      The colors are shuffled by concatenating the transposed of the matrix
      <C>ListsOfIP_Colors</C>. The list obtained is taken as the default list of colors.
       <Listing Type="default list of colors"><![CDATA[
gap> ShuffledIP_colors;
"red""green""blue""-red""-green""-blue""black!80""black!30"
  "red!50""green!50""blue!50""-red!50""-green!50""-blue!50"
  "black!70""black!25""red!20""green!20""blue!20""-red!20"
  "-green!20""-blue!20""black!60""black!20""red!80!green!50"
  "green!80!red!50""blue!80!red!50""-red!80!green!50""-green!80!red!50",
  "-blue!80!red!50""black!50""black!15""red!80!blue!60"
  "green!80!blue!60""blue!80!green!60""-red!80!blue!60"
  "-green!80!blue!60""-blue!80!green!60""black!40""black!10" ]
]]></Listing>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[width=0.8\textwidth]{../images/intpic_default_colors.pdf}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/intpic_default_colors.jpg"></center><br>
      </Alt>
      These are the &IntPic; default colors.  Although the user is free to use other colors, we warn that there is a need of compatibility with the colors used in other packages (the
      &LaTeX; <Package>xcolor</Package>, for instance).
      
To emphasize the integers of some sets by using some of the colors in some list of colors (for instance the default colors) one may use empty lists to force the non usage of the colors whose order in the list of colors is the order of these empty lists in the array of integers to be emphasized.     

      <Example><![CDATA[
gap> m3 := Filtered([1..40],i->i mod 3=0);
[ 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39 ]
gap> m5 := Filtered([1..40],i->i mod 5=0);
[ 5, 10, 15, 20, 25, 30, 35, 40 ]
gap> m7 := Filtered([1..40],i->i mod 7=0);
[ 7, 14, 21, 28, 35 ]
gap> 
gap> arr := [[],[],m3,[],m5,[],m7];;
gap> tkz:=IP_TikzArrayOfIntegers([1..40],10,rec(highlights:=arr));;
]]></Example>
      <Alt Only="LaTeX">
        \begin{center}
        \includegraphics[width=0.8\textwidth]{../images/mults_3_5_7}
        \end{center}
      </Alt>
      <Alt Only="HTML">
        <br><center><img src="../images/mults_3_5_7.jpg"></center><br>
      </Alt>

    </Section>
  <Section>
    <Heading>Functions to deal with colors</Heading>
<!--  
    <ManSection>
      <Heading>Auxiliary functions -- picking some elements from lists</Heading>
      <Func Name="PickElementsFromList" Arg="arg"/>
      <Description>
        input: source is a list of length s; n is the number of elements to be picked
        the distance between the elements picked is approximately the number of
        remaining elements by the number of deserts. The first element is always
        picked. 
        <Example><![CDATA[
gap> PickElementsFromList([1..20],3);
[ 1, 10, 19 ]
gap> PickElementsFromList([1..20],5);
[ 1, 5, 9, 13, 17 ]
]]></Example>
      </Description>
      <Func Name="PickSublistsFromListOfLists" Arg="arg"/>
      <Description>
        uses PickElementsFromList...
        <Example><![CDATA[
gap> PickSublistsFromListOfLists([[1..20],[1..20]],[3,5]);
[ [ 1, 10, 19 ], [ 1, 5, 9, 13, 17 ] ]
]]></Example>
      </Description>
    </ManSection>
    <ManSection>
      <Heading>Creating tables of colors by tones</Heading>
      <Func Name="IP_ColorsByTones" Arg="arg"/>
      <Description>
        the input is either a list of tones or are tones
        <Example><![CDATA[
gap> IP_ColorsByTones("Reds","Blues");
[ [ "red", "red!50", "red!20", "red!80!green!50", "red!80!blue!60" ], 
  [ "blue", "blue!50", "blue!20", "blue!80!red!50", "blue!80!green!60" ] ]
]]></Example>
        <Example><![CDATA[
gap> IP_ColorsByTones("Red","Blues");
 the strings [ "Red" ] does not correspond to lists of colors 
and will be ignored.
[ [ "blue", "blue!50", "blue!20", "blue!80!red!50", "blue!80!green!60" ] ]
]]></Example>
      </Description>
    </ManSection>
    
    <ManSection>
      <Heading>Picking colors for one picture</Heading>
      <Func Name="IP_ColorsForOneImage" Arg="arg"/>
      <Description>
        this function has as input a list of tones (from the list
        RecNames(RecordOfColorsForIP_);
        ["Reds","rEDS","Greens","gREENS","Blues","bLUES","DGrays","LGrays"])  and a
        number (which is the number of colors to be used)  
        -- the tones list is optional: if it is not present, all colors are used.  
        -- the number is optional too: when not present, the colors used are all the
        colors of the selected tones. For each tone there is a list of *5* colors 
        <P/>
        The output is a table of colors that are as far as possible from being similar
        <Example><![CDATA[
gap> IP_ColorsForOneImage("rEDS","LGrays",5);
[ [ "-red", "-red!20", "-red!80!blue!60" ], 
  [ "black!30", "black!20", "black!10" ] ]
]]></Example>
      </Description>
    </ManSection>
-->

For the moment we only provide one function, which shuffles colors from lists of colors.
   <ManSection>
      <Heading>Shuffle colors from lists of colors</Heading>
      <Func Name="ShuffleIP_Colors" Arg="mat"/>
      <Description>
        The argument <A>mat</A> is a list of lists of colors of the same length. The output is obtained by concatenating the transposed of <A>mat</A>.
        <Example><![CDATA[
gap> ShuffleIP_Colors([IP_ColorsRedTones,IP_ColorsCompBlueTones]);
"red""-blue""red!50""-blue!50""red!20""-blue!20"
  "red!80!green!50""-blue!80!red!50""red!80!blue!60""-blue!80!green!60" 
 ]
]]></Example>
        <Alt Only="LaTeX">
          \begin{center}
          \includegraphics[scale=1.2]{../images/shuffle_red_comp_blue.pdf}
          \end{center}
        </Alt>
        <Alt Only="HTML">
          <br><center><img src="../images/shuffle_red_comp_blue.jpg"></center><br>
        </Alt>
        
      </Description>
    </ManSection>
    
  </Section>
</Chapter>

95%


¤ Dauer der Verarbeitung: 0.15 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.