LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to set equi-distant xtics in GNUPLOT ? (https://www.linuxquestions.org/questions/linux-software-2/how-to-set-equi-distant-xtics-in-gnuplot-786902/)

mq15 02-04-2010 05:25 AM

How to set equi-distant xtics in GNUPLOT ?
 
Hi there,
Plotting with GNUPLOT, I have these values at x-axis:
Quote:

0, 20, 40, 80
For this I have used:
Quote:

set xtics (0,20,40,80)
Note that distance between 0, 20 and 40 is equal (i.e 20) but it is not equal between 40 and 80 (i.e. 40). Therefore it shows xtics at 0, 20, and 40 with equal gaps (equally spaced) and inserts more gap between xtics of 40 and 80. I want all the xtics equally spaced. Is it possible? How please ?

Thanks

raju.mopidevi 02-04-2010 07:13 AM

i am using gnuplot for my project, as per my knowledge it uses same scale throughout the axis.
xtics used to give same spaces for every unit.

mq15 02-04-2010 07:58 AM

1 Attachment(s)
Please see the file attached.
There is more gap between 40 and 80 than between 0, 20 and 20 , 40.

evo2 02-04-2010 08:18 AM

Quote:

Originally Posted by mq15 (Post 3852218)
Please see the file attached.
There is more gap between 40 and 80 than between 0, 20 and 20 , 40.

That is how it should be, otherwise the scale of the horizontal axis is meaningless. If I ever caught a student screwing with an axis scale like that...

Evo2.

mq15 02-04-2010 08:53 AM

Quote:

If I ever caught a student screwing with an axis scale like that...
sorry sir...

OK. Thanks a lot evo2

mq15 02-04-2010 10:16 AM

1 Attachment(s)
In fact I saw this type of graphs (please see the attachment) in research papers and therefore I though that I should also do like this.

Best Regards.

raju.mopidevi 02-04-2010 04:15 PM

They get those values by taking X values as logarithmic values.

Whenever we have to show the values of smaller and large values in a single graph, better to use logarithmic values.

raju.mopidevi 02-04-2010 04:16 PM

They get those values by taking X values as logarithmic values.

Whenever we have to show the values of smaller and large values in a single graph, better to use logarithmic values.

mq15 02-05-2010 01:42 AM

Okay, thanks raju.mopidevi. So kindly tell me how can I do it.
Best Regards.

evo2 02-05-2010 03:15 AM

Code:

set log x
But, for the data set you have shown a log scale makes no sense. Trust me: I have letters before and after my name in a relevant field.

Evo2.

mq15 02-05-2010 07:16 AM

for what type of data sets, the log values are suitable..?

evo2 02-05-2010 07:32 AM

Quote:

Originally Posted by mq15 (Post 3853694)
for what type of data sets, the log values are suitable..?

When the data has structure over a number of orders of magnitude. For example the frequency response of low pass filter. See the second plot on the following wikipedia page:

http://en.wikipedia.org/wiki/Low-pass_filter

Notice that the horizontal axis is on a log scale so that you can easily see the details between 0.1 up to 1000 rad/sec.

Your data on the other hand has information between 20 and 80: all in the same order of magnitude and therefore best shown on a linear scale.

Cheers,

Evo2.

mq15 02-05-2010 10:43 AM

Thanks.


All times are GMT -5. The time now is 07:33 PM.