[R] Query on R plot : Unequispaced label on x-axis

ritwik_r at isical.ac.in ritwik_r at isical.ac.in
Wed Jul 24 16:06:12 CEST 2013


Dear R users,

I want to plot a one variable continuous function f(x) vs x, x=[0,1]. Say
for example: f(x)= x^2. Now, using the command plot(f~x) I will get a
curve where the range of x-axis is [0,1] with all equispaced label. But, I
need something else, and that is: my curve will be such that 80% on x-axis
the range would be [0,0.5] and the rest 20% would contain [0.5,1]. Let me
draw informally here. Say, the line below is my x-axis in graph and my
plotting points are like:



          ________________________________________
          0     0.01      0.1        0.5         1

Any help or suggestion will be highly appreciable.

Regards,
Ritwik
ISI Kolkata



More information about the R-help mailing list