5
$\begingroup$

I want to have a few plots in a row. Two of these plots are 3d plots, and one is a 2d plot. The problem is that once I do GraphicsRow the tick labels of the plot are put in new locations which do not make sense with the view I set.

Here is a minimal example:

ptest = Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, 
  LabelStyle -> 
   Directive[FontFamily -> "CMU Serif", FontSize -> 20, Black], 
  ViewAngle -> Automatic, ViewCenter -> {0.5`, 0.5`, 0.5`}, 
  ViewMatrix -> Automatic, 
  ViewPoint -> {-2.9521414722227757`, -1.2900948113785387`, 
    1.0346574822792727`}, ViewProjection -> Automatic, 
  ViewRange -> All, ViewVector -> Automatic, 
  ViewVertical -> {0.2801838803175893`, 0.12244120873972492`, 
    0.9521056367927531`}]

Gives the following results: enter image description here

But this messes the labels:

GraphicsRow[{ptest}]

enter image description here

How can I fix this?

$\endgroup$

1 Answer 1

6
$\begingroup$

You could use AxesEdge to fix the position:

ptest = Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, 
  LabelStyle -> 
   Directive[FontFamily -> "CMU Serif", FontSize -> 20, Black], 
  ViewAngle -> Automatic, ViewCenter -> {0.5`, 0.5`, 0.5`}, 
  ViewMatrix -> Automatic, 
  ViewPoint -> {-2.9521414722227757`, -1.2900948113785387`, 
    1.0346574822792727`}, ViewProjection -> Automatic, 
  ViewRange -> All, ViewVector -> Automatic, 
  ViewVertical -> {0.2801838803175893`, 0.12244120873972492`, 
    0.9521056367927531`},
  AxesEdge -> {{1, 1}, {-1, -1}, {-1, 1}}];

GraphicsRow[{ptest}, ImageSize -> 500]
$\endgroup$
1
  • $\begingroup$ I guess I don't have the OP's font family.... $\endgroup$
    – Michael E2
    Apr 6 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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