Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have attached a scheme of the problem. Essentially what I need is to plot 2 different vector fields in a single graph with different domains.

The underlying physical problem is to model electric current around and inside a sphere of a different material than the surroundings.

enter image description here


share|improve this question
up vote 1 down vote accepted
 StreamPlot[{1, 1}, {x, -1, 1}, {y, -1, 1}, RegionFunction -> (Norm[{#, #2}] < 1 &),   
                                BoundaryStyle -> Thick, StreamStyle -> {Thick, Green}],
 StreamPlot[{0, 1}, {x, -2, 2}, {y, -2, 2}, StreamStyle -> {Thick, Red},
                               RegionFunction -> (Abs[#2] < 1.5 && Norm[{#, #2}] > 1 &),  
                               BoundaryStyle -> Thick, 
  , PlotRange -> All, AspectRatio -> Automatic, PlotRangePadding -> Scaled@.1]

enter image description here

share|improve this answer
Apparently you found the question :P – Öskå May 21 '14 at 9:40
@Öskå blind shot :p – Kuba May 21 '14 at 9:43

Your Answer


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.