I want to plot the following plot (this one was done using Windows Paint):
As I see it, we need two Graphics:
g1=Graphics[Text[Framed[Style["256\[Times]256 pixels", 16, Bold], FrameMargins -> 3], {0, 2.5}]]
g2=ContourPlot[Exp[-(x^2 + y^2)], {x, -2, 2}, {y, -2, 2}, GridLines -> {Range[-2, 2, 0.5], Range[-2, 2, 0.5]}]
When I do
Show[{ g1 , g2 } ,
PlotRange -> {{-2, 2}, {-2, 3}}
]
I extended the plot region to be up to 3 in the vertical direction, but it caused g2 to squeeze, which I don’t want it to.
I am familiar with PlotLabel, but I don’t want to use it, because the figure I am working on has some additional other Graphics elements to be included in it.
Moreover, if Show is the correct function to use, it extends the vertical grid lines (unwanted). How to fix it?
I also tried Overlay. But it just lays g1 on top of g2. Not desired.
Any help?






