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

Constraints

  • I only want to use \psaxes rather than multiple calls of \psxTick, \rput, \uput.
  • I want to have trigonometric labels with even multiple of π/3.

My attempts

As usual, we can have trigonometric labels of multiple of π/3 without any problem.

\begin{pspicture}(-\psPiTwo,-1)(\psPiTwo,1) 
    \psaxes[dx=\PiOverThree](0,0)(-\psPiTwo,-1)(\psPiTwo,1)
\end{pspicture}

In order to get even multiple of π/3, I changed dx=\TwoPiOverThree as follows.

\begin{pspicture}(-\psPiTwo,-1)(\psPiTwo,1) 
    \psaxes[dx=\TwoPiOverThree](0,0)(-\psPiTwo,-1)(\psPiTwo,1)
\end{pspicture}

However, this change should be followed by setting Dx=\TwoPiOverThree. Unfortunately, setting Dx produces errors (that you can see by compiling my MWE below).

Minimal Working Example

\documentclass[preview,border=12pt,12pt,dvipsnames]{standalone}
\usepackage{pst-plot}

\def\PiOverThree{1.047197}
\def\TwoPiOverThree{2.094395}

\psset
{   
    xtrigLabels,
    trigLabelBase=3,
    xunit=\PiOverThree,
}


\begin{document}
\section*{With $\pi/3$ step (completed)}

\begin{pspicture}(-\psPiTwo,-1)(\psPiTwo,1) 
    \psaxes[dx=\PiOverThree](0,0)(-\psPiTwo,-1)(\psPiTwo,1)
\end{pspicture}

\section*{With $2\pi/3$ step (uncompleted)}

\begin{pspicture}(-\psPiTwo,-1)(\psPiTwo,1) 
    \psaxes[dx=\TwoPiOverThree](0,0)(-\psPiTwo,-1)(\psPiTwo,1)
\end{pspicture}


% does not compile
%\begin{pspicture}(-\psPiTwo,-1)(\psPiTwo,1)    
    %\psaxes[dx=\TwoPiOverThree,Dx=\TwoPiOverThree](0,0)(-\psPiTwo,-1)(\psPiTwo,1)
%\end{pspicture}
\end{document}

enter image description here

Bonus Questions

How to set different trigLabelBase for x-axis and y-axis? I cannot find xtrigLabelBase and ytrigLabelBase in the pst-plot documentation. They might not be implemented yet.

share|improve this question

1 Answer 1

up vote 3 down vote accepted
 \psaxes[dx=\TwoPiOverThree,Dx=2](0,0)(-\psPiTwo,-1)(\psPiTwo,1)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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