1
$\begingroup$

Using Wolframalpha or inline free format you can obtain a nice representation of a sum of vectors. An example is shown below. Whish is the hidden code? (or a code that make the same representation). I can make it using Graphics and Arrow but is too long, I suppose there is a easy way to do it. I think in one of the last Mathematica version has been included a build-up function to make it.

= plot vector(1,1) + vector(2,3)

enter image description here

$\endgroup$
0
$\begingroup$
WolframAlpha["plot vector(1,1)+vector(2,3)", {{"Result", 1}, "Content"}]

enter image description here

To see the code behind you can take the first Part:

WolframAlpha["plot vector(1,1)+vector(2,3)", {{"Result", 1}, "Content"}][[1]]

enter image description here

To get the main graphics, use

WolframAlpha["plot vector(1,1)+vector(2,3)", {{"Result", 1}, "Content"}][[1, 1, 
   1, 1, 1]] // RawBoxes

enter image description here

and to get the legend use

WolframAlpha["plot vector(1,1)+vector(2,3)", {{"Result", 1}, "Content"}][[1, 1, 
   1, 1, 2]] // RawBoxes

enter image description here

To get the result pane with special styling, use

WolframAlpha["plot vector(1,1)+vector(2,3)", IncludePods -> "Result", 
 AppearanceElements -> {"Pods"}]

enter image description here

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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