Skip to content
Advertisement

Manual scaling of axis (poltting with boxes) in gnuplot

I’m trying to plot a really long list, which represents frequency of some data. The x axis goes from 1 to 1881, and the y goes from 1 to 1978. I tried plotting with the following configurations:

JavaScript

But i get the following result: enter image description here

Which is clearly not good because there are these intersections of the boxes. I want to have some kind of scale that have a lot more space between 10 and 150 than the outside of this area. How can i do that? I’ve tried every combination of logs and xtics and couldn’t make it look good. The y axis seems good to me, the only problem is the spacing of x-axis. Also, i want to know how to do this in gnuplot specifically (if possible). Thanks.

Advertisement

Answer

It seems to me that your script overrides somewhere the default boxwidth. The default behavior is:

By default, adjacent boxes are extended in width until they touch each other. A different default width may be specified using the set boxwidth command. Relative widths are interpreted as being a fraction of this default width.

So for example this:

JavaScript

then yields: enter image description here

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement