Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to make a visual representation of the curve $y=x^{2}$, with $x\in\left[0,1\right]$ in the vector field defined by $\vec{F}=\left[-y,x\right]$.

However, as far as I can tell there does not seem to be any facility which allows me to do this in Mathematica (I've looked through as much of the documentation as I could find which seemed pertinent).

I know how to do each of these separately, e.g.

Plot[x^2,{x,0,1}]
VectorPlot[{-y,x},{x,-3,3},{y,-3,3}]

However, I am unsure how I can combine these two plots (or plot them both at the same time).

Thanks in advance!

share|improve this question
add comment

2 Answers

up vote 11 down vote accepted

You should make use of Show and appropriate options e.g. we added PlotRange, AspectRatio etc. :

Show[{ Plot[x^2, {x, -3, 3}, PlotRange -> 3, PlotStyle -> {Thick, Darker @ Green}],
       VectorPlot[{-y, x}, {x, -3, 3}, {y, -3, 3}]}, AspectRatio -> 1]

enter image description here

share|improve this answer
    
Thank you, this seems to be what I was looking for! +1 –  Shaktal Jul 13 '12 at 23:21
add comment

Instead of using Show you might prefer the paradigm of David Park's Presentations package:

<< Presentations`

Draw2D[{VectorDraw[{-y, x}, {x, -3, 3}, {y, -3, 3}],
        Darker@Green, Draw[x^2, {x, -3, 3}]},
       PlotRange->3, Axes->True]
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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