Here is my code:

vslA = RegionPlot[x > 0, {x, 0, 8}, {y, 0, 1},
  AspectRatio -> Automatic, PlotStyle -> RGBColor[1, 1, .4]]
fslA = RegionPlot[x > 0, {x, 8, 14}, {y, 0, 1},
  AspectRatio -> Automatic, PlotStyle -> RGBColor[0.2, 0.8, .4]]
Show[fslA, vslA, AxesOrigin -> {0, 0}]

But unfortunately, instead of a long rectangle with about 57% area of one color and 43% area of a different color, I am getting this graphic:

enter image description here

Why is this happening and how can I fix this? I plan to create a big graphic by specifying coordinates of every little piece and I have worked out the coordinates just so the shapes and positions come out exactly where I want them but already just the first piece has me stumped.

  • 3
    $\begingroup$ Show take options from the first argument. Hence Show[p1,p2] will use p1 options for the overall plot. You can override the options inside Show, or if you know which p you want to use for all the options, put that as the first in the list. $\endgroup$
    – Nasser
    Dec 27 '13 at 20:54
Show[fslA, vslA, AxesOrigin -> {0, 0}, PlotRange -> All, 
     AspectRatio -> (AspectRatio /. AbsoluteOptions[fslA, AspectRatio])]  

Mathematica graphics


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.