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:

i want to plot a diagram by this command using mathemathica. but it plotted as a beeline while it must be have a bit aberration.what is my fault in plotting?

enter image description here i want to display my diagram such as this.enter image description here

share|improve this question

marked as duplicate by Kuba, rasher, Yves Klett, gpap, Oleksandr R. Jun 18 at 9:11

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.

1  
Do not use AxesOrigin which forces scale that does not match your data's deviation scale. Looks like an exact duplicate of recent question. –  Kuba Jun 18 at 7:56

1 Answer 1

up vote 0 down vote accepted

enter image description here

Is this what you expected? I used Show[ ] to superimpose two ListPlot[ ] graphics; the first ListPlot has the blue data points, and the second ListPlot has a dashed red line connecting data points.

There is a more efficient way to get the same result in a single graphic using ListLinePlot, but it might take you awhile to track down the right option settings. This two graphic method always works and involves only a quick copy/paste operation and an option setting or two.

    sdata = {4.67884, 4.67874, 4.67862, 4.67850, 4.67843, 4.67845, 
    4.67856, 4.67872, 4.67885};

    Show[
        ListPlot[

          sdata,

          Frame -> True,

          FrameLabel -> {"\[Alpha] (10^-1)", " R[\[HBar]\[Omega]] (eV)"}, 

          PlotRange -> {{0, 10}, {4.6782, 4.6790}},

          ImageSize -> 8*72, 

          PlotStyle -> {Darker[Blue, 0.5], PointSize[0.012]}, 

          BaseStyle -> 16],

        ListPlot[

          sdata, 

          Frame -> True,

          FrameLabel -> {"\[Alpha] (10^-1)", " R[\[HBar]\[Omega]] (eV)"},

          PlotRange -> {{0, 10}, {4.6782, 4.6790}}, 

          ImageSize -> 8*72,

          PlotStyle -> {Dashed, Darker[Red, 0.5]}, 

          Joined -> True, 

          BaseStyle -> 16]]
share|improve this answer
    
first thanks for your answer. i edited my question.i add a diagram that shows my expected. –  hadi Jun 18 at 9:58
    
thanks very much. very useful . –  hadi Jun 27 at 7:38

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