Good day forum,

I would like to create an axis that will further my illustration of a plot on a logarithmic scale...

[TEX] 10^0, \qquad 10^1, \qquad 10^2, \qquad 10^3, \qquad \ldots [/TEX]

This I can achieve, statically, with :

but, now I would like to create a function to specifically generate a certain style of plot and would like to dynamically generate the labels according to the range passed. My problem boils down to manipulating the input of the expression() function to achieve desired results. I believe that the input of expression() should be in the form of some sort of list?!?

I have tried, intuitively and naively, things such as expression(paste(10^seq(0,3,1), collapse=", ")), but to no avail. (the 0 and 3 in example will later be replaced with variables representing suitable upper and lower bounds)

Could someone please give me a nudge in the right direction with regards to my problem.

Thanks in advance

Chippy

I would like to create an axis that will further my illustration of a plot on a logarithmic scale...

[TEX] 10^0, \qquad 10^1, \qquad 10^2, \qquad 10^3, \qquad \ldots [/TEX]

This I can achieve, statically, with :

Code:

`axis(2,at=10^seq(0,3,1),labels=expression(10^0,10^1,10^2,10^3), las=1)`

I have tried, intuitively and naively, things such as expression(paste(10^seq(0,3,1), collapse=", ")), but to no avail. (the 0 and 3 in example will later be replaced with variables representing suitable upper and lower bounds)

Could someone please give me a nudge in the right direction with regards to my problem.

Thanks in advance

Chippy

Last edited: