I am using pgfplots to visualize my experimental results, but some of the experimental results have very large numbers ($10^18-10^19$ for example). The way pgfplots deals with them is that, it puts a large factor (say $10^18$) on top of the figure and chooses the labels as small numbers.

So far, I received some negative feedback about that kind of labeling in my charts; I need to know:

  1. Is there a better way to do this?

  2. Is it standard? can somebody refers to me some good publications that have used the same approach to represent the axis tick labels?

Here is a sample document:

                    \addplot coordinates {
                    \addplot coordinates {
                    \addplot coordinates {
                    \addplot coordinates {
                    \addplot coordinates {
                    \addplot coordinates {
                    \addplot coordinates {
  • No, I'm afraid there really isn't. The behavior you describe is exactly what I would want to see done in charts. It should be pretty simple for those in affected fields to draw up counterexamples for you to use. A solid reference you can use is Trees, Maps, and Theorems; it's all about this kind of stuff. Commented Oct 23, 2014 at 1:50
  • @emab What field are you working in?
    – Jake
    Commented Oct 23, 2014 at 5:29
  • 2
    What I usually do if I need to plot your diagram, I would divide the y-value by 1e15 and then add a corresponding y-label with the unit in peta-whatsoever (or milli/micro/nano/pico...). However, this is only useful, if you have to plot something with units.
    – bene
    Commented Oct 23, 2014 at 6:36
  • @Jake I'm working on large networks but I haven't seen such large numbers in other papers (they certainly haven't dealt with such metrics)
    – orezvani
    Commented Oct 23, 2014 at 7:10
  • 1
    What kind of negative feedback did you receive (which is strange anyway)? And what do they do instead then print out the whole number?
    – percusse
    Commented Oct 23, 2014 at 7:26

1 Answer 1


This is your original plot:

enter image description here

I think you want to edit the scale factor which is mentioned automatically by the pgfplots on your plots. I found a sample code on this answer on this site, which may help you. This is possible by using two codes bellow which are added to the


If you want to write your own preferred scale factor on the axis, you can use this:

ytick scale label code/.code={}

enter image description here

you may have a scale factor like $10^15$ or what ever you want in the .code={$10^15$}. You may also use some metric prefixes instead of the power number, for instance P for peta and 10^15 or E for exa and 10^18.

If you don't want to have any scaling factor added to your plot, leave the space inside .code={} empty, so nothing will be printed.

Also, you can use

scaled y ticks={real:1000000000000000}

enter image description here

to scale the y axis values as much as you prefer, but the format of the scaled numbers will be somehow the same as the default scaling format you have in your original plotting code.

As a matter of fact, the other option you have is to refine the data before you put them in your latex code. If you want them to have values smaller than what they appear in your plot, a rough solution may be editing your data before, in a spreadsheet or your programming compiler and then copy them in your plotting data.

Questions bellow may also help you with your problem:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .