Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Graphics > 2d_plot > semilogx

semilogx

2D semilogarithmic plot

Syntax

semilogx // demo
semilogx(y)
semilogx(x, y)
semilogx(x, fun)
semilogx(x, list(fun, param))
semilogx(.., LineSpec)
semilogx(.., LineSpec, GlobalProperty)
semilogx(x1, y1, LineSpec1, x2,y2,LineSpec2,...xN, yN, LineSpecN, GlobalProperty1,.. GlobalPropertyM)
semilogx(x1,fun1,LineSpec1, x2,y2,LineSpec2,...xN,funN,LineSpecN, GlobalProperty1, ..GlobalPropertyM)
semilogx(axes_handle,...)

Arguments

x

vector or matrix of strictly positive real numbers or integers. If omitted, it is assumed to be the vector 1:n where n is the number of curve points given by the y parameter.

y

vector or matrix of real numbers or of integers.

fun, fun1, ..

handle of a function, as in semilogx(x, sin).

If the function to plot needs some parameters as input arguments, the function and its parameters can be specified through a list, as in semilogx(x, list(delip, -0.4))

LineSpec

This optional argument must be a string that will be used as a shortcut to specify a way of drawing a line. We can have one LineSpec per y or {x,y} previously entered. LineSpec options deals with LineStyle, Marker and Color specifiers (see LineSpec). Those specifiers determine the line style, mark style and color of the plotted lines.

GlobalProperty

This optional argument represents a sequence of couple statements {PropertyName,PropertyValue} that defines global objects' properties applied to all the curves created by this plot. For a complete view of the available properties (see GlobalProperty).

axes_handle

This optional argument forces the plot to appear inside the selected axes given by axes_handle rather than the current axes (see gca).

Description

semilogx plots data using a base 10 logarithmic scale for the x-axis and a normal (linear) scale for the y-axis. The possible syntaxes and arguments are the same as the plot function besides the condition that the abscisae values in x argument be strictly positive.

If the current axes is not empty and the the x-axis has a negative lower bound then its scale will remain linear after the plot.

Enter the command semilogx to see a demo.

Examples

w=logspace(-2,2,1000);
s=%i*w;
g=1../(s.^2+s+1);
clf("reset")

semilogx(w,abs(g));

title("$\LARGE \left|1/(s^2+s+1)\right|\mbox{ for }s=i\omega$")
xlabel("$\LARGE \omega$")

See also

  • plot — 2D plot
  • semilogy — 2D semilogarithmic plot
  • loglog — 2D logarithmic plot
  • LineSpec — to quickly customize the lines appearance in a plot
  • GlobalProperty — customizes the objects appearance (curves, surfaces...) in a plot or surf command

History

VersionDescription
6.1.1 Function semilogx added.
Report an issue
<< scatter 2d_plot semilogy >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:23:28 CET 2022