I am trying to draw some intervals with PSTricks. I found some LaTeX code but I don't know how to edit it to get what I want.
I would like to draw the x-axis line with the interval in red but I don't want to have any graduation and I would like to write a and b under each extremity of my interval.
Here is the code that I have.
\documentclass[a4paper]{article}
\usepackage{pst-all}
\usepackage{pstricks-add}
\begin{document}
\psset{xunit=0.5cm, yunit=0.5cm, yAxis=false} %scales the picture, removes the y-axis
\begin{pspicture}(-11,0)(11,0)
\psaxes[Dx=5, subticks=5]{->}(0,0)(-11,0)(11,0) %creates axes
\psline[linewidth=3pt, linecolor=red]{[-]}(-2,0)(5,0) %creates a thick, red line from -2 (closed) to 5 (closed)
\end{pspicture}
\end{document}
Furthermore, is it possible to compile the document directly ? I mean, I use texmaker and with PST I have to compile with XeLatex then show the pdf, and I would like to show the pdf directly.
Thank you for helping !