this is my second question on this topic. This is the previous question, which I didn't specify correctly. Let's suppose I have a data:
x=[-10^-3,-10^-2,-10^-1,0,10^-3,10^-2,10^-1]
y=[-10^-3,-10^-2,-10^-1,0,10^-3,10^-2,10^-1]
My goal is to plot this in loglog
scale. The result should be similar to plot(x,y)
, but both axes must be in logarithmic scale. I want y-axis to contain both negative and positive values, and be in logarithmic scale.
This doesn't solve my problem, as long as negative y-values are ommited:
plot(x,y)
set(gca, 'XScale', 'log')
set(gca, 'YScale', 'log')
The simple solution would be to plot negative values as possitive, but with different symbols/color. But I want to have a nice loglog
plot with both negative and positive values of y
.
As far as I understood, there is no tools to do this in Matlab rightaway, so I am going to develop my own function to plot it. Does anyone know usefull commands, that can be used to do this? Is that possible to do it with a few build-in commands, or the only way is to create a programm, starting from the basics?
I would appreciate any hints or codes.
Edit: in this question the problem is solved for semilog plot. My problem is loglog
Thanks.