From: Gabor K. <Kal...@ms...> - 2008-09-12 15:11:19
|
In my earlier (9/11/08) "submit" I asked: "How can one "fool" Vpython to display y=f(log10(x)) as a semi-log plot?" To clarify: How can I change the "tick-marks" to a log scale? see sample program below: ************************ from visual import * from visual.graph import * graph1=gdisplay(x=0,y=0, width=400,height=300,title="semilog",xtitle="f=10^x", ytitle="y",xmax=4,xmin=1,ymax=500,ymin=0, foreground=color.black,background=color.white) plot1 = gvbars(delta=0.5, color=color.green) x=[10,100,1000] y=[400,200,100] for i in range(0,3): plot1.plot(pos=(log10(x[i]),y[i])) |