Message Boards Message Boards

GROUPS:

Set x axis at y=0 on the following plot?

Posted 8 days ago
154 Views
|
2 Replies
|
0 Total Likes
|

I plotted this graph

enter image description here with this command:

Labeled[Show[
  Plot[in, {r, 0, a}, 
   Ticks -> {{{a, "a"}, {3 a, "3a"}, {5 a, "5a"}, {7 a, "7a"}, {9 a, 
       "9a"}, {12 a, "12a"}}, {0, 2.2*^-11}}, PlotRange -> All],
  Plot[out, {r, a, 12 a}], PlotRange -> All, AxesStyle -> Black, 
  AxesLabel -> {r, "Intensity"}, 
  LabelStyle -> Directive[Bold, Medium]], Style["HE11", Bold, Large]]

in is a function to be plotted between 0 to a,

and

out is a function to be plotted between a to 12a.

As you can see, the r (horizontal axis) doesn't lie with the y=0 line. How can I fix this?

Should I instruct the PlotRange option in the Show function, rather than inside the second Plot? (I tried, but no graphics was produced).

2 Replies

I can't evaluate your code on my machine (don't have the necessary data), but are you looking for AxesOrigin?

Labeled[Show[
  Plot[in, {r, 0, a}, 
   Ticks -> {{{a, "a"}, {3 a, "3a"}, {5 a, "5a"}, {7 a, "7a"}, {9 a, 
       "9a"}, {12 a, "12a"}}, {0, 2.2*^-11}}, PlotRange -> All], 
  Plot[out, {r, a, 12 a}], PlotRange -> All, AxesStyle -> Black, 
  AxesLabel -> {r, "Intensity"}, LabelStyle -> Directive[Bold, Medium],
  AxesOrigin -> {0, 0}
  ], Style["HE11", Bold, Large]]
Posted 8 days ago

Yep, that's the one.

Thanks very much.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract