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.

The goal is to create an image like the one below

Desired output

which was created using

ParametricPlot[{t, t^2}, {t, 0, 1}, Epilog -> Disk[{0.5, 0.5}, 0.09]]

but instead of using the Graphics primitive I want to use a Rasterized version of Disk.

Using the commands below, how can I duplicate the result?

bkgd = Rasterize[Disk[{0, 0}, 0.09]];
pplot = ParametricPlot[{t, t^2}, {t, 0, 1}];

It is important that ParametricPlot remain un-Rasterized.

share|improve this question

1 Answer 1

up vote 10 down vote accepted

First, you have to define bkgd differently because it's not a disk unless you make it a Graphics first:

bkgd = Rasterize[Graphics@Disk[{0, 0}, 0.09]];

Then use Inset:

ParametricPlot[{t, t^2}, {t, 0, 1}, 
Epilog -> {Inset[bkgd, {.5, .5}, Automatic, .2]}]

Disk in plot

The position and size of the disk image are controlled by the last three arguments of Inset.

You will note that the last argument (the size scale) is a factor relative to the plot region (with 1 corresponding to the whole width).

share|improve this answer

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.