Skip to content

Axis Ticks Customization #443

@kkoudas01

Description

@kkoudas01

Is there a way to control exactly how axis ticks are displayed and which ones appear?

For example, the following code is supposed to remove the ticks from the horizontal axis and leave only the label S on the vertical axis, but that’s not what actually happens.

Clear["Global`*"]
y0 = 0.5;
y1 = 3.5;
S = 2;
k = 1.6;
d = 1;
colorF = Blue;
tc = Log[Abs[S - y0]/y0]/(k S);
lgcL[t_] := y0 S/(y0 + (S - y0) Exp[-k S t])
lgcG[t_] := y1 S/(y1 + (S - y1) Exp[-k S t])
Plot[{lgcL[t], lgcG[t]}, {t, tc - 3, 4},  
 Background -> LightGray, AxesLabel -> {"t", "y"}, 
 Ticks -> {None, {{S, "S"}}}]

With MMAView, the parameter Ticks -> {None, {{S, "S"}}} works perfectly. However, I’d like to know how to achieve the same result without relying on MMAView — just by writing the appropriate Mathematica code directly.

Image

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions