From: Robert L. <ro...@le...> - 2004-09-28 10:41:10
|
Tom Kornack wrote: > >>> 2. Is it possible to make two scales for the x and y axes? Like celsius >>> on one side and fahrenheit on the other? >> >> >> I haven't done it myself but I think you can use the set >> x2/y2...(range, label, >> tics, etc) to do this, i.e. gnuplot('set x2range [-10:10]') > > > import Gnuplot > g = Gnuplot.Gnuplot() > g('set x2range [-10:10]') > g('show x2range') > g.plot([[0,1.1], [1,5.8], [2,3.3], [3,4.2]]) > > Am I doing the right thing? I appreciate your help. A quick search of the Gnuplot mailing list (http://groups.google.com/groups?group=comp.graphics.apps.gnuplot) turned up that you also need to call 'set x2tics', i.e. g('set x2tics'). Note that this sets up x2 as an independent axis, if you do want to do the Celsius/Fahrenheit style related axis 'thing' you may have to use a function to specify the x2 range. Search the above list for more info - I found : http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=9inmhv%24clg%241%40brogar.bmsc.washington.edu&rnum=8&prev=/groups%3Fq%3Dx2range%26hl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dcomp.graphics.apps.gnuplot%26selm%3D9inmhv%2524clg%25241%2540brogar.bmsc.washington.edu%26rnum%3D8 which is a little old and may be out of date. HTH Robert |