Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This question already has an answer here:

How to put label "Iterations" below x-axis? Possibly in an easy way without multiple commands.

a = {1, 3, 6, 3, 2};
b = {3, 2, 5, 6, 9};
c = {2, 7, 3, 1, 6};
d = {4, 2, 8, 8, 10};
am = {Position[a, Max[a]][[1, 1]], Max[a]}
bm = {Position[b, Max[b]][[1, 1]], Max[b]}
cm = {Position[c, Max[c]][[1, 1]], Max[c]}
dm = {Position[d, Max[d]][[1, 1]], Max[d]}
ListLinePlot[{a, b, c, d}, AxesLabel -> {"Iteraciones", "Objetivo"}, 
 PlotStyle -> {{Thickness[0.01], Orange}, {Dashed, 
    Thickness[0.01]}, {Thickness[0.01], Dashed, Red}}, 
 Epilog -> {PointSize[0.04], Point[{am, bm, cm, dm}]}]
share|improve this question

marked as duplicate by Yves Klett, Kuba, gpap, Michael E2, Sjoerd C. de Vries Apr 28 at 11:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2  
Would you be happy to use a framed plot? Then modding to Frame -> True, FrameLabel -> {"Iteraciones", "Objetivo"} does the trick already. –  Yves Klett Apr 28 at 8:53
3  
Without Frame you can use Labeled[(*plot*),"Iteraciones", Bottom] –  Kuba Apr 28 at 8:54
    
@kuba SOLVED. Thank You –  Mika Ike Apr 28 at 9:00
    
@YvesKlett SOLVED. Thank you. –  Mika Ike Apr 28 at 9:01
3  
When you type "label plot below" you will get a first link to: mathematica.stackexchange.com/q/17747/5478 so next time please try to look for the answer via search engine in top right corner first :) –  Kuba Apr 28 at 9:02
show 5 more comments

2 Answers 2

up vote 2 down vote accepted

Personally, I prefer Frame->True for most of my plots.

a = {1, 3, 6, 3, 2};
b = {3, 2, 5, 6, 9};
c = {2, 7, 3, 1, 6};
d = {4, 2, 8, 8, 10};
max = {Position[#, Max[#]][[1, 1]], Max[#]} & /@ {a, b, c, d};
ListLinePlot[{a, b, c, d}, Frame -> True, 
 FrameLabel -> {Style["Iteraciones", Red, Large], 
   Style["Objetivo", Blue, Small]}, 
 PlotStyle -> {{Thickness[0.01], Orange}, {Dashed, 
    Thickness[0.01]}, {Thickness[0.01], Dashed, Red}}, 
 Epilog -> {PointSize[0.04], Point[max]}]

Mathematica graphics

share|improve this answer
add comment

This is just a modification of Yves' answer. If you really don't want a framed look, you can expand out the option value of the Framed option to address each side individually, like this:

a = {1, 3, 6, 3, 2};
b = {3, 2, 5, 6, 9};
c = {2, 7, 3, 1, 6};
d = {4, 2, 8, 8, 10};
max = {Position[#, Max[#]][[1, 1]], Max[#]} & /@ {a, b, c, d};
ListLinePlot[{a, b, c, d}, Frame -> {{True, False}, {True, False}}, 
 PlotRangePadding -> {{0.2, 0.5}, {0, 0.5}}, 
 FrameLabel -> {Style["Iteraciones", Red, Large], 
   Style["Objetivo", Blue, Small]}, 
 PlotStyle -> {{Thickness[0.01], Orange}, {Dashed, 
    Thickness[0.01]}, {Thickness[0.01], Dashed, Red}}, 
 Epilog -> {PointSize[0.04], Point[max]}]

enter image description here

Notice that I have also added some PlotRangePadding to avoid the big dots being cut off.

share|improve this answer
    
And here was I thinking that this was such a trivial addition to Yves' answer that I should CW it. Three up votes in an hour? –  Verbeia Apr 28 at 11:49
    
Well, it is a useful addition :D –  Yves Klett Apr 28 at 14:25
add comment

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