0
$\begingroup$

I am trying to plot arrows whose lengths are proportional to a list of numbers, on top of a 2D arrayplot. For example, I have an Arrayplot like this-

enter image description here

I was able to lay circles whose diameter was proportional to the "color" of the array plot. For example, the largest diameter circle is overlaid on the darkest square, the circle with zero radius on the lightest square, so on and so forth. Something like this-

enter image description here

Instead of the circles, I want to have arrows/line segments whose length is proportional to the color. I am not sure how to do that. Any hints will be greatly appreciated

$\endgroup$
1
  • 1
    $\begingroup$ Please post the code to generate the Arrayplot, so people can copy and paste it $\endgroup$
    – MelaGo
    Commented Aug 15 at 4:11

1 Answer 1

0
$\begingroup$

As a possible display combination use a 10x10 color array and a graphics primitives array of arrows with centered start point as an Epilog

     lattice =  { (*  array orgin (1/2,1/2), color  r, g, random blue*)
              Array[(RGBColor[0.3 + #1/10, 0.3 + #2/10, 
                                RandomReal[{0, 0.6}]] &), {10, 10}, 1/2],
   {(* array origin (1/2,1/2), arrow from center (n,m)  to (n,m - quadratic)   *)
    Thickness[0.005],
    Array[( 
        Arrow[ N[{{#1, #2}, {#1, #2 - #1^2/20} + 
                4/Sqrt[1 + #1^2 + #2^2] {1, 1}}]]   &), 
    {10, 10},  {1/2,   1/2}]}}  ;

colored arrow ArrayPlot

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.