Clear Filters
Clear Filters

scatter plot with non-linear axis

1 view (last 30 days)
Hi together!
I have been trying for a while now to make a certain graph, but just do not succeed :-(
Here is what I need:
A scatter plot, where the y axis is linear scaled: y = [0.7, 0.9] and the x-axis is non-linear scaled: x = [1/128, 1/64, 1/32, 1/16, 1/8, 1/4, 1/2, 1, 2]
Could anybody PLEASE help me??

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 17 Nov 2012
x=1:10
y=sin(x)
x1=1./2.^(-1:length(x)-2),
scatter(x1,y)
  6 Comments
Walter Roberson
Walter Roberson on 17 Nov 2012
set(gca, 'XScale', 'log')
This will give you log 10, but log 2 is a linear multiple of log 10.
Birgit
Birgit on 17 Nov 2012
thanks to both of you! :-) it's great to get help here!

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!