# Axis break in Mathematica [duplicate]

I'm looking for a way to make a plot similar to the one I've sketched. So far all I've found is this discussion, which mostly uses Grid. I want the second part of the plot to have a smaller interval, as shown, but when I try their technique, I get this plot:

Grid@{{Plot[Sin[2 x], {x, 0, 4}, PlotRange -> {-1.1, 1.1},
AxesOrigin -> {0, 0}], Style[Rotate["/", 0 Degree], 20],
Plot[Cos[2 x], {x, 6, 8}, PlotRange -> {-1.1, 1.1}, Axes -> {True, False}]}} Notice how the scaling on the second plot changes. I'd like to keep the scaling the same between the first and second plot.

## marked as duplicate by LLlAMnYP, user9660, Öskå, MarcoB, dr.blochwaveNov 29 '15 at 17:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• My answer in the linked duplicate candidate may be overkill for your needs, but it is possible to use it to achieve your sketch too. – LLlAMnYP Nov 29 '15 at 13:43

## 1 Answer

Grid[{{Plot[Sin[2 x], {x, 0, 4}, PlotRange -> {-1.1, 1.1},
AxesOrigin -> {0, 0}, Ticks -> {{1, 2, 3, 4}, Automatic}, AspectRatio -> Full],
Style["/", 20],
Plot[Cos[2 x], {x, 6, 8}, PlotRange -> {-1.1, 1.1},
Axes -> {True, False}, Ticks -> {{6, 7, 8}}, AspectRatio -> Full]}},
ItemSize -> {{10, 1, 5}}] Note that Ticks is used to provide a common format for the x-axis.

• thanks, this works for me! I think a key for it is the ItemSize which seems to scale the different parts parts – Hanmyo Nov 30 '15 at 0:26