I'm assuming that what concerns you is that you don't want the x axis
labeled 0, 2, 4 but rather 1, 100, 1e4. visual.graph doesn't provide
this capability. Your solution, to use and label the x axis in terms of
the log10 of the quantity of interest, is the best you can do, and is
indeed a semilog plot of the data.
However, notice that visual.graph is simply a Python program, so you
could make a copy of it, modify it, and import it instead of
visual.graph. The revised version might be of general interest.
Bruce Sherwood
Gabor Kalman wrote:
> 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]))
|