In many engineering problems, some characteristics of data can be seen more clearly through logarithmic transformation of data. The curve of data points depicted in logarithmic coordinate system can directly represent logarithmic transformation.

There are two kinds of logarithmic transformation: double logarithmic transformation and single axis logarithmic transformation. Loglog function can be used to achieve the double log coordinate transformation, semilogx and Semilogy functions can be used to achieve the single axis log coordinate transformation.

Loglog (Y) means that the x and Y coordinates are logarithmic coordinates

Semilogx (Y) means that the x axis is a logarithmic coordinate system

Semilogy (…). That means that the Y-axis is a logarithmic coordinate system

So plotyy has two y axes, one on the left and one on the right

Example 1: Create a simple loglog with the square tag.

Solution: Enter a command

X = logspace (1, 2);

loglog(x,exp(x),’-s’)

Grid on % annotated grid

The produced figure is:

Example 2: Create a simple semi-logarithmic graph.

Solve input command:

x=0:.1:10;

semilogy(x,10.^x)

The produced figure is:

example 3: draw function graph, logarithmic graph and semilogarithmic graph of y=x^3.

Solution: Enter in the window:

x=[1:1:100];

Subplot (2,3,1);

plot(x,x.^3);

grid on;

title ‘plot-y=x^3’;

Subplot (2, 31);

loglog(x,x.^3);

grid on;

title ‘loglog-logy=3logx’;

Subplot (2 filling);

plotyy(x,x.^3,x,x);

grid on;

title ‘plotyy-y=x^3,logy=3logx’;

Subplot (2, 4);

semilogx(x,x.^3);

grid on;

title ‘semilogx-y=3logx’;

Subplot (2,3,5);

semilogy(x,x.^3);

grid on;

title ‘semilogy-logy=x^3’;

The produced figure is:

There are two kinds of logarithmic transformation: double logarithmic transformation and single axis logarithmic transformation. Loglog function can be used to achieve the double log coordinate transformation, semilogx and Semilogy functions can be used to achieve the single axis log coordinate transformation.

Loglog (Y) means that the x and Y coordinates are logarithmic coordinates

Semilogx (Y) means that the x axis is a logarithmic coordinate system

Semilogy (…). That means that the Y-axis is a logarithmic coordinate system

So plotyy has two y axes, one on the left and one on the right

Example 1: Create a simple loglog with the square tag.

Solution: Enter a command

X = logspace (1, 2);

loglog(x,exp(x),’-s’)

Grid on % annotated grid

The produced figure is:

Example 2: Create a simple semi-logarithmic graph.

Solve input command:

x=0:.1:10;

semilogy(x,10.^x)

The produced figure is:

example 3: draw function graph, logarithmic graph and semilogarithmic graph of y=x^3.

Solution: Enter in the window:

x=[1:1:100];

Subplot (2,3,1);

plot(x,x.^3);

grid on;

title ‘plot-y=x^3’;

Subplot (2, 31);

loglog(x,x.^3);

grid on;

title ‘loglog-logy=3logx’;

Subplot (2 filling);

plotyy(x,x.^3,x,x);

grid on;

title ‘plotyy-y=x^3,logy=3logx’;

Subplot (2, 4);

semilogx(x,x.^3);

grid on;

title ‘semilogx-y=3logx’;

Subplot (2,3,5);

semilogy(x,x.^3);

grid on;

title ‘semilogy-logy=x^3’;

The produced figure is:

### Read More:

- Graphics rendering pipeline diagram of OpenGL
- R learning notes (1) — ARIMA model
- How to use dangerously set inner HTML in react
- Matlab realization of user-defined curve and legend
- [Python] numpy library array splicing np.concatenate Detailed explanation and examples of official documents
- Deep learning: derivation of sigmoid function and loss function
- geom_ Warning message: sign function’s own error
- Performance Clarke error grid analysis
- The image operation of MATLAB — every detail operation of colorbar
- “Error! Reference source not found.” “error! Reference source not found solution to problem for
- “Error! Reference source not found.” “error! The source of the problem was not found
- VTK cultivation 26: basic operation of image_ Three dimensional image slice extraction
- An error was reported during PSU upgrade: OPatch failed with error code 73
- tf.one_ How to use hot ()
- The 11th Zhejiang Provincial Collegiate Programming Contest
- Solution to PCL XL error of HP p2055d laser printer
- Solving equations and equations with MATLAB
- VTK learning notes: visual model
- Solution of off grid pin in Ad
- In tensorflow tf.reduce_ Mean function