LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-04-2010, 04:25 AM   #1
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Linux Mint Cinnamon
Posts: 224

Rep: Reputation: 31
Question 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

Last edited by mq15; 02-04-2010 at 06:54 AM.
 
Old 02-04-2010, 06:13 AM   #2
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
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.
 
Old 02-04-2010, 06:58 AM   #3
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Linux Mint Cinnamon
Posts: 224

Original Poster
Rep: Reputation: 31
Question

Please see the file attached.
There is more gap between 40 and 80 than between 0, 20 and 20 , 40.
Attached Thumbnails
Click image for larger version

Name:	nrl.png
Views:	54
Size:	19.6 KB
ID:	2648  
 
Old 02-04-2010, 07:18 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by mq15 View Post
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.
 
Old 02-04-2010, 07:53 AM   #5
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Linux Mint Cinnamon
Posts: 224

Original Poster
Rep: Reputation: 31
Question

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

OK. Thanks a lot evo2
 
Old 02-04-2010, 09:16 AM   #6
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Linux Mint Cinnamon
Posts: 224

Original Poster
Rep: Reputation: 31
Thumbs up

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.
Attached Thumbnails
Click image for larger version

Name:	aodv-dsdv.jpg
Views:	51
Size:	7.8 KB
ID:	2650  
 
Old 02-04-2010, 03:15 PM   #7
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
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.
 
Old 02-04-2010, 03:16 PM   #8
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
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.
 
1 members found this post helpful.
Old 02-05-2010, 12:42 AM   #9
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Linux Mint Cinnamon
Posts: 224

Original Poster
Rep: Reputation: 31
Okay, thanks raju.mopidevi. So kindly tell me how can I do it.
Best Regards.
 
Old 02-05-2010, 02:15 AM   #10
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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.
 
Old 02-05-2010, 06:16 AM   #11
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Linux Mint Cinnamon
Posts: 224

Original Poster
Rep: Reputation: 31
for what type of data sets, the log values are suitable..?
 
Old 02-05-2010, 06:32 AM   #12
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by mq15 View Post
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.
 
1 members found this post helpful.
Old 02-05-2010, 09:43 AM   #13
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Linux Mint Cinnamon
Posts: 224

Original Poster
Rep: Reputation: 31
Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to know always know the IP of a distant PC ? sthg in repos.? frenchn00b Linux - General 1 10-23-2008 02:16 AM
Family: How distant is too distant. Or... RHLinuxGUY General 10 08-21-2008 10:03 PM
Local X server for distant desktop niamor Linux - Networking 3 02-09-2006 02:06 AM
distant connection to mac os 9 [newbie] aseedb Linux - Newbie 0 11-27-2003 06:57 AM
Remote config/setup a distant PC satimis Linux - Networking 2 10-29-2003 05:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration