2

So right now I have something like this:

enter image description here

As you can see, the xticks on the second (smaller) plot are a complete mess. Is it possible to just show 3 values (the first, midpoint and last ones)?

Secondly, is it possible to place something like a ~ or // break symbol at the beginning of the smaller plot, as it just shows the last 10 values of the bigger plot?

4
  • Can you include the code to arrive to this plot?
    – percusse
    Jul 17 '13 at 15:44
  • the (presumably) negative notations $-10^{13}$ and $-10^9$ should really be entirely in math mode so that there's a real minus sign, not ha hyphen. (i've edited the title to spell "omit" correctly, so it can be found with a search.) Jul 17 '13 at 16:14
  • Usually PGFPlots will not place the tick labels this close together, it looks like you changed some options that lead to the overlapping. Could you edit your question to include the code for the axis?
    – Jake
    Jul 17 '13 at 16:44
  • Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. Oct 19 '17 at 13:53
2

To add axis discontinuity use axis option axis x discontinuity=crunch|parallel|none (only one of the three, your choice) as explained in pgfplots manual at page 123.

With option xtick of the axis environment you can choose what ticks to show, just type them inside brackets in xtick={} and separate them with ,.

1
  • 1
    You can also add the \xticklabels={} list to specify the labels of the ticks you select with \xtick={}.
    – Ludovic C.
    Jul 17 '13 at 15:58

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.