Question: I'm using `PlotLegends` in v9. It seems that in the documentation examples, plots and legends are combined into one graphic:

Here's an example from `LineLegend` in the documentation:

```
Plot[{Sin[x], Cos[x]}, {x, 0, 5}, PlotLegends -> LineLegend["Expressions"]]

```

Which outputs this (notice how the legend is selected within the graph):

![enter image description here](https://i.stack.imgur.com/FHJK6.jpg)

However, if this same line is evaluated by me, it becomes this:

![enter image description here](https://i.stack.imgur.com/qHYSu.jpg)

Is this default behavior? Did Wolfram put graphics in place of output for their documentation? If this is default behavior, can they be combined without creating a rasterized image?

**UPDATE:** It turns out that *Mathematica* documentation sometimes contain rasterized images for output which was causing the initial confusion. The main point of the question is the behavior of the `Legended` (and related) function and exporting images with it included. The context menu and `Export` command treat this different.

Answer: 
Legends can be put inside the Graphics, for example:

```
Plot[{Sin[x], Cos[x]}, {x, 0, 5}, 
 PlotLegends -> Placed[LineLegend["Expressions"], {Right, Top}]]

```
Legends seem to display as grids, unless you specify a `Placed[..., Center]` or some coordinates `Placed[..., {0.3, 0.6}]`.

In these cases, they are still `Legended` objects, but you can extract the graphics they display like. If you used other directives such as `Placed[..., Right]` or `After`, or `Left`, etc, perhaps you could replace it with some approximate coordinates. For example

```
getTheGraphics[g_Graphics] := g;
getTheGraphics[plot_Legended] := Module[{gr},
  ToBoxes[
    plot /. Placed[i_, coords : _Symbol, f_] :> Placed[i, coords /. {
         Left -> {-0.1, 0.5}, 
         Right | After -> {1.1, 0.5}, 
         Top -> {0.5, 1.1}, 
         Bottom -> {0.5, -0.1}}, f]] /. 
   g_GraphicsBox :> (gr = g; Break[Null, ReplaceAll]);
  ToExpression[gr]
  ]

```

so

```
Plot[{Sin[x], Cos[x]}, {x, 0, 5}, 
  PlotLegends -> 
   Placed[LineLegend["Expressions"], Top]] // getTheGraphics

```

gives a `Graphics`

I don't know what is the desired resizing behaviour, and I also didn't read that you cared about that so far.