1

When I use the comma option of the command \psaxes, only the y-coordinates are displayed with a comma while the x-coordinates are still displayed with a dot.

My figure is included in a somewhat big file. When I extract it and put it alone in a blank tex file, the problem disappears.

Do you have any idea where the problem could come from?

Here is my code:

\begin{figure}[h]
\begin{center}
    \psset{yunit=12cm,xunit=7.8cm}
    \begin{pspicture}(0,-0.042)(1.1,0.45)
        \readdata{\TauxRATHRRelatif}{Donnees/Chapitre1/Taux_RAT_HR_Relatif_1990_2007.txt}
        \psaxes[comma,Dx=0.1,Dy=0.05,tickstyle=bottom]{->}(0,0)(1.1,0.45)[Âge relatif,0][Taux d'évènements en \%,0]
        \psframe(0.7,0.35)(1.0,0.42)
        \psline[linecolor=blue](0.72,0.40)(0.8,0.40)
        \psline[linecolor=red](0.72,0.37)(0.8,0.37)
        \rput[l](0.82,0.4){\footnotesize Taux brut}
        \rput[l](0.82,0.37){\footnotesize Taux lissé}
        \listplot[linecolor=blue,plotNo=1,plotNoMax=2]{\TauxRATHRRelatif}
        \listplot[linecolor=red,plotNo=2,plotNoMax=2]{\TauxRATHRRelatif}
    \end{pspicture}
\caption{Taux de RAT en âge relatif (générations 1990-2007)}
\end{center}
\end{figure}

The first lines of the Taux_RAT_HR_Relatif_1990_2007.txt file are:

0.01    0.08950938  0.051705574
0.02    0.072002824 0.069167033

Thank you very much for your help.

Regards,

Olivier

[EDIT]: My mistake: I forgot to delete these lines at the beginning of every figure of my document:

\makeatletter
\def\pst@@@hlabel#1{#1}
\makeatother

I'm truly sorry for the waste of your time and for the double answer.

But I'm still interested in knowing how to make the comma option work after having customized the x-coordinates labels like this:

\newarray\ListeMois
\readarray{ListeMois}{Janvier&Février&Mars&Avril&Mai&Juin&Juillet&Août&Septembre&Octobre&Novembre&Décembre}
\makeatletter
\def\pst@@@hlabel#1{\rput[rb]{30}{\scriptsize\ListeMois(#1)}}
\makeatother
  • Post a minimal working example. We can't find the problem without having something to work with. :) – Svend Tveskæg Jun 22 '14 at 22:52
  • I just wanted to know if someone already encountered the same problem because I think there is nothing specific to my code. I nevertheless edited my first message and provided my code. – Olivier7121 Jun 23 '14 at 4:52
  • see my answer ... – user2478 Jun 23 '14 at 12:57
1
\listfiles
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{pst-plot}
\begin{document}

\psset{unit=10}
\begin{pspicture}(0,-0.042)(1.1,0.45)
   \psaxes[comma,Dx=0.1,Dy=0.1,tickstyle=bottom,  
     xLabels={Janvier,Février,Mars,Avril,Mai,Juin,Juillet,Août,Septembre,Octobre,Novembre,Décembre},
     xLabelsRot=45,xmathLabel=false,xlabelFontSize=\footnotesize]{->}(0,0)(1.1,0.45)[Âge relatif,0][Taux d'évènements en \%,0]
\end{pspicture}

\end{document}

enter image description here

  • Thanks for your answer Herbert. Do you know how to change the font size of the x-coordinates labels only? I looked into the documentation of pst-plot and added these line \def\pshlabel#1{\scriptsize{#1}} before my figure but it didn't work. I'd like to avoid the heavy solution of writting xLabels={\scriptsize Janvier,\scriptsize Février,etc.}. – Olivier7121 Jun 24 '14 at 5:40
  • Do not use the redefinition of \psthlabel. Use xlabelFontSize=... instead. This is possible with the pst-plot.tex from texnik.dante.de/tex/generic/pst-plot or from tomorrows update of TeXLive. – user2478 Jun 24 '14 at 7:15
  • Please accept the answer if it helped, then the question is not in the unanswered section. – user2478 Jun 28 '14 at 6:49
  • Sorry for the delay: the email was sent into the spam section of my mail box. Thanks again Herbert! – Olivier7121 Jul 7 '14 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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