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.

I have this list saved in matrix 6x2:

\begin{array}{cc} 0 & 1.216 \\ \frac{\pi }{3} & 0 \\ \frac{2 \pi }{3} & 0.1351 \\ \pi & 0 \\ \frac{4 \pi }{3} & 0.04863 \\ \frac{5 \pi }{3} & 0 \\ \end{array}

Now i have saved this matrix in a variable called myList:

{ { 0 , 1.215 } , { π/3 , 0 } , { (2π)/3, 0.1351 } , { π , 0 } , { (4π)/3 , 0.04863 } , { (5π)/3 , 0 } }

if i use the comand:

ListPlot[myList, AxesLabel -> {\[Omega], Subscript[C, n]}, 
 Filling -> Axis]<br>

the result is this:
enter image description here

The problem 1 is:
i would like to see the blue points and the line under them with RED color.

The problem 2 is:
I don't see the first coordinate on the plot {0,1.1215}
there is a way to set the range of y for example (from 0 to 2) and of x for example (from0 to 5) ??? in this way i can see all points.

The problem 3 is:
i would like to see the $\omega$ axe with the Trigonometric value instead of the natural number.

share|improve this question

closed as off-topic by Oleksandr R., m_goldberg, Michael E2, Yves Klett, rasher Apr 26 at 21:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Oleksandr R., m_goldberg, Michael E2, Yves Klett, rasher
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 2 down vote accepted

Your question is probably going to be closed (because the answers to your questions can be easily found in the Documentation of ListPlot, but here is your answer:

  • Problem 1: FillingStyle -> Red, PlotStyle -> Red;

  • Problem 2: PlotRange -> All;

  • Problem 3: Ticks -> {First /@ myList}.


ListPlot[myList, AxesLabel -> {ω, Subscript[C, n]}, 
  Filling -> Axis, FillingStyle -> Red, PlotStyle -> Red,
  PlotRange -> All, Ticks -> {First /@ myList}]

enter image description here

share|improve this answer
thank you so much –  Giovanni Far Apr 26 at 17:08
Please note that the documentation of Mathematica answers all your questions. All you need is to search for it :) –  Öskå Apr 26 at 17:09
i did that but i didnt found exactly what i need –  Giovanni Far Apr 26 at 17:14
Well, all of your questions are in the ListPlost documentation :) –  Öskå Apr 26 at 17:17
For example, i know how can i change the color of the x and y axes... (mathematica allows to do that with the gui option... ) but i dont have the result that i want. if i would like just to color the line of the 2 axes how can i do? i tried FrameStyle->Directive[Red] but it doesnt works –  Giovanni Far Apr 26 at 17:19

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