0
$\begingroup$

Subscript[[Alpha], 1]={1.50,1.75,1.90,1.95}; c1={0.670,0.860,0.950,0.970}; c2={0.440,0.570,0.630,0.650}; c3={0.400,0.510,0.570,0.580}; c4={0.380,0.490,0.540,0.560}; g1=ListLinePlot[{c1,c2,c3,c4},Frame->True, FrameLabel->{Style["!(*SubscriptBox[([Alpha]), (1)])", Medium, Bold, Black], Style["[Rho]", Bold, Black,10]}, FrameStyle->{Directive[Bold,Black,12],Directive[Bold,Black,12]}, PlotLegends->Placed[{"!(*SubscriptBox[([Alpha]), (2)])=2", "!(*SubscriptBox[([Alpha]), (2)])=4", "!(*SubscriptBox[([Alpha]), (2)])=6", "!(*SubscriptBox[([Alpha]), (2)])=8"}, {0.2, 0.6}], PlotTheme -> "Monochrome", PlotLabel->Style["(a):Utilization Factor", Black,Bold,10]](*You lost a square bracket in the right had for ListLinePlot *)

My problem is the values of $\alpha_1$ are not shown on the x-axis. How can I get these values on the x-axis?

Edit

[I am adding a major edit of the OP's code dump so readers can see what the problem is -- m_goldberg]

Subscript[α, 1] = {1.50, 1.75, 1.90, 1.95}; 
c1 = {0.670, 0.860, 0.950, 0.970};
c2 = {0.440, 0.570, 0.630, 0.650}; 
c3 = {0.400, 0.510, 0.570, 0.580}; 
c4 = {0.380, 0.490, 0.540, 0.560}; 
ListLinePlot[{c1, c2, c3, c4},
  Frame -> True, 
  FrameLabel -> 
    {Style[HoldForm[Subscript[α, 1]], Medium, Bold, Black], 
     Style["ρ", Bold, Black, 10]}, 
  FrameStyle -> {Directive[Bold, Black, 12], Directive[Bold, Black, 12]}, 
  PlotLegends -> 
    Placed[HoldForm[Subscript[α, 2] = #] & /@ {2, 4, 6, 8}, {0.8, 0.22}],
  PlotTheme -> "Monochrome", 
  PlotLabel -> Style["(a):Utilization Factor", Black, Bold, 10]]

plot

$\endgroup$
2
  • $\begingroup$ Perhaps look at the documentation for Ticks? $\endgroup$
    – Bill
    Commented May 18, 2016 at 3:27
  • $\begingroup$ You might try adding the option DataRange -> MinMax[Subscript[α, 1]] $\endgroup$
    – m_goldberg
    Commented May 18, 2016 at 13:01

1 Answer 1

7
$\begingroup$
a1 = {1.50, 1.75, 1.90, 1.95};

c1 = {0.670, 0.860, 0.950, 0.970};
c2 = {0.440, 0.570, 0.630, 0.650};
c3 = {0.400, 0.510, 0.570, 0.580};
c4 = {0.380, 0.490, 0.540, 0.560};

data = (Transpose[{a1, #}] & /@ {c1, c2, c3, c4});

g1 = ListLinePlot[data,
  Frame -> True, 
  FrameLabel -> {Style[Subscript[α, 1], Medium, Bold, Black], 
    Style["ρ", Bold, Black, 10]}, 
  FrameStyle -> Directive[Bold, Black, 12],
  PlotLegends -> Placed[{
     Row[{Subscript[α, 2], " = 2"}],
     Row[{Subscript[α, 2], " = 4"}],
     Row[{Subscript[α, 2], " = 6"}],
     Row[{Subscript[α, 2], " = 8"}]},
    {0.8, 0.25}],
  PlotTheme -> "Monochrome",
  PlotLabel -> Style["(a):Utilization Factor", Black, Bold, 12]]

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Woah, MMA sure can make nice plots with the (almost) default settings now! I had a moment of disbelief at first. +1 $\endgroup$
    – LLlAMnYP
    Commented May 18, 2016 at 6:53
  • $\begingroup$ Dear Bob Hanlon Thanks $\endgroup$
    – Amin
    Commented May 19, 2016 at 5:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.