|
From: marcel1 <cemarcel@u.washington.edu> - 2010-05-13 20:55:11
|
Hello users, I would like to plot data which have various Y values, but share only one of two possible x values. to better distinguish datapoints, I would like to "jitter" the x values slightly (ie add some random noise to the x value). I have looked a lot online, found only a very sparse entry in "gnuplot in action" which suggests the following command: >plot "myfile" u 1:(0.25*rand(0)-.35) I understand how rand(0) could help, but can't quite figure out how to generalize from this to use in my plot instructions which have the form > plot "myfile" u 1:2 #the 1 data column contains 1s and 2s so, >plot "myfile" u rand(0)*1:2 Strangely, this yields x-values up to 50 whereas i would have expected either 1 or 2 times some random decimal <1. >plot "myfile" u 1*(rand(0):2 # and various other permutations also bad Clearly I am missing something. Any suggestions welcome. Thanks, marcel -- View this message in context: http://old.nabble.com/Help-plotting-%22jittered%22-datapoints-tp28552513p28552513.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |