1
$\begingroup$

I have been trying to customize the frame ticks and frame label around a certain contour plot and am running into very strange behavior where the graphics will get cut off by ImageSize rather than being resized.

In the following example code (more or less minimal), note that all I have changed is a 0 to 0. in the frametick specification.

What's going on here?

Minimal example:

ContourPlot[θ1 + θ2 == 0, {θ1, -3 π/2, π/2}, {θ2, -π/2, 3 π/2},
 FrameTicks -> {{{0, π}, None}, {{-π, 0.}, None}}, 
 FrameLabel -> {"\!\(\*SubscriptBox[\(θ\), \(1\)]\)", "\!\(\*SubscriptBox[\(θ\), \(2\)]\)"}, 
 BaseStyle -> {FontSize -> 20}, ImageSize -> 200]

ContourPlot[θ1 + θ2 == 0, {θ1, -3 π/2, π/2}, {θ2, -π/2, 3 π/2},
 FrameTicks -> {{{0, π}, None}, {{-π, 0}, None}}, 
 FrameLabel -> {"\!\(\*SubscriptBox[\(θ\), \(1\)]\)", "\!\(\*SubscriptBox[\(θ\), \(2\)]\)"}, 
 BaseStyle -> {FontSize -> 20}, ImageSize -> 200]

input and output

$\endgroup$
15
  • $\begingroup$ Sure, thanks. I just copied the code from my notebook; is there some easy trick so symbols don't turn into ASCII in general when I do that? $\endgroup$
    – j.c.
    Commented Mar 14, 2014 at 14:07
  • $\begingroup$ @Öskå If you remove the subscripts from FrameLabel, the problem disappears. In this case, the subscripts seem to be needed to reproduce the problem. $\endgroup$
    – Michael E2
    Commented Mar 14, 2014 at 14:09
  • $\begingroup$ And it works fine for me: here. Thus, Mathematica version? OS? Was it a clean kernel? $\endgroup$
    – Öskå
    Commented Mar 14, 2014 at 14:09
  • 1
    $\begingroup$ If it matters, I'm running version 8.0.4.0, Mac OS X. $\endgroup$
    – j.c.
    Commented Mar 14, 2014 at 14:20
  • 2
    $\begingroup$ @Öskå I'm on a Mac, so you might be right that it is Mac-related only. $\endgroup$
    – Michael E2
    Commented Mar 14, 2014 at 14:37

1 Answer 1

1
$\begingroup$

There is an Issue on "9.0 for Mac OS X x86 (64-bit) (January 24, 2013)"

There is "no" Issue on "10.0 for Mac OS X x86 (64-bit) (December 4, 2014)"

ContourPlot[\[Theta]1 + \[Theta]2 == 
  0, {\[Theta]1, -3 \[Pi]/2, \[Pi]/2}, {\[Theta]2, -\[Pi]/2, 
  3 \[Pi]/2}, 
 FrameTicks -> {{{0, \[Pi]}, None}, {{-\[Pi], 0.}, None}}, 
 FrameLabel -> {"\!\(\*SubscriptBox[\(\[Theta]\), \(1\)]\)", 
   "\!\(\*SubscriptBox[\(\[Theta]\), \(2\)]\)"}, 
 BaseStyle -> {FontSize -> 20}, ImageSize -> 200]

ContourPlot[\[Theta]1 + \[Theta]2 == 
  0, {\[Theta]1, -3 \[Pi]/2, \[Pi]/2}, {\[Theta]2, -\[Pi]/2, 
  3 \[Pi]/2}, FrameTicks -> {{{0, \[Pi]}, None}, {{-\[Pi], 0}, None}},
  FrameLabel -> {"\!\(\*SubscriptBox[\(\[Theta]\), \(1\)]\)", 
   "\!\(\*SubscriptBox[\(\[Theta]\), \(2\)]\)"}, 
 BaseStyle -> {FontSize -> 20}, ImageSize -> 200]

But note the "." on 0:

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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