1
$\begingroup$

Mathematica 8.0

I have some function of two variables, $x$ and $y$, and I would like to plot $x$ vs. $y$ parameter space probability distribution function in which the contours are represented by Rainbow ColorDatafunction of ContourPlot command. I managed to create the contour plot that include the labels of the axes, tick marks and a bar legend next to the main plot in the following manner:

mainPlot = 
  ContourPlot[
   FractionalCoverageHybridlog[s, M], {s, 20.3, 22.3}, {M, 9, 13}, 
   Contours -> {-8.1, -8.15, -8.2, -8.25, -8.3, -8.35, -8.4, -8.45, \
-8.5, -8.6, -8.7, -8.8, -8.9, -9, -9.1, -9.2, -9.3, -9.4, -9.5, -10}, 
   ColorFunctionScaling -> False, 
   ColorFunction -> (ColorData["Rainbow"][Rescale[#, {-10, -8.1}]] &),
    PlotRange -> {{20.3, 22.3}, {9, 13}, {-10, -8.1}}, 
   ImageSize -> 400, 
   PlotLabel -> "X vs. Y", 
   FrameLabel -> {"x-coordinate","y-coordinate"}];

legendPlot = 
  ContourPlot[y, {x, -10, 0.1}, {y, -10, -8.1}, 
   Contours -> {-8.1, -8.15, -8.2, -8.25, -8.3, -8.35, -8.4, -8.45, \
-8.5, -8.6, -8.7, -8.8, -8.9, -9, -9.1, -9.2, -9.3, -9.4, -9.5, -10}, 
   ColorFunctionScaling -> False, 
   ColorFunction -> (ColorData["Rainbow"][Rescale[#, {-10, -8.1}]] &),
    AspectRatio -> 10, 
   PlotRange -> {{-10, 0.1}, {-10, -8.1}, {-10, -8.1}}, 
   FrameTicks -> {None, {-8.1, -8.15, -8.2, -8.25, -8.3, -8.35, -8.4, \
-8.45, -8.5, -8.6, -8.7, -8.8, -8.9, -9, -9.1, -9.2, -9.3, -9.4, \
-9.5, -10}, None, None}, ImageSize -> 100];

Show[Graphics[Inset[mainPlot, {Left, Bottom}, {Left, Bottom}]], 
 Graphics[Inset[
   legendPlot, {25, 9.5}, {Left, Bottom}, {1, Automatic}]], 
 PlotRange -> {{20.3, 26}, {9, 13}}, ImageSize -> 500]

However, as I am trying to convert this plot into a pdf and use it for my latex file, it seems that axes labels and tick marks and the bar legend numbers are all very small and cannot really be read easily. Could you please teach me how to do this more efficiently?

Sincerely,

$\endgroup$
1
$\begingroup$

Thanks dear yarchik for your valuable link. Also, I was able to solve my issue by adding/modifying the following commands to the existing ones in the first line:

FrameLabel -> {Style["x-coordinate", 24],Style["y-coordinate", 24]}

FrameTicksStyle -> Directive[FontSize -> 22]

And adding the following command to the second line:

FrameTicksStyle -> Directive[FontSize -> 22]
|improve this answer|||||
$\endgroup$
  • 1
    $\begingroup$ Just wondering: How did this simple question get 144 views, when others get perhaps 15? $\endgroup$ – David G. Stork Nov 7 '16 at 3:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.