Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
    
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? – j.c. Mar 14 '14 at 14:07
    
@Öskå If you remove the subscripts from FrameLabel, the problem disappears. In this case, the subscripts seem to be needed to reproduce the problem. – Michael E2 Mar 14 '14 at 14:09
    
And it works fine for me: here. Thus, Mathematica version? OS? Was it a clean kernel? – Öskå Mar 14 '14 at 14:09
1  
If it matters, I'm running version 8.0.4.0, Mac OS X. – j.c. Mar 14 '14 at 14:20
2  
@Öskå I'm on a Mac, so you might be right that it is Mac-related only. – Michael E2 Mar 14 '14 at 14:37

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

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.