Combine graphics with different PlotRange?

I would like to combine 2 graphics with different plotranges, but the plotranges for each graphic shoudnt change.

As an example:

Show[{
  Graphics[{Yellow, Rectangle[{-1, -1}, {1, 1}]}, 
   PlotRange -> {{-1, 1}, {-1, 1}}],
  Graphics[{Thick, Circle[{0, 0}, 0.9]}, PlotRange -> {{0, 1}, {0, 1}}]
  }]

What I need is this:

What I get is this:

I didnt found a simple solution for this. It would be great if someone could help me :slight_smile:

A PlotRange specification will not clip the graphics as you already found out. Unfortunately there is no ‘clipping’ primitive as of yet, though I have requested it. In this case you can solve it by using a 3rd argument in Circle. This will not work in general for any primitive unfortunately…

Graphics[{Yellow, Rectangle[{-1, -1}, {1, 1}], Black, Thick, 
  Circle[{0, 0}, 0.9, {0, Pi/2}]}, PlotRange -> {{-1, 1}, {-1, 1}}]

Sometimes you can get away by using Overlay, or rasterizing your Graphics and then using ImageOverlay. Or using RegionUnion and (discretised) versions of your primitives along with your a rectangular viewing range region. To sum up: you have to be creative sometimes!

Thank you for the answer. I only thought there must be a solution, because PlotRangeClipping works fine, if there is some more space needed for axes and ticks:

But if there is no such solution, I try a workaround with hiding things with white Rectangles before drwaing on the “extra plotrange”. I will also study your other suggetions.

Kind regards!

You could also using Inset-ing a clipped (using PlotRangeClipping) graphics… I’ve never tried that…