(1) How to change the label size of psaxes (in pstricks), I havent
found a detail explanation of this in pstricks documentation.
(2) How to change the positioning of the labels from the tickmarks. I
mean, if I want the horizontal labels to be -3pt RIGHT from each tick
(NOT -3pt away from it!) how is that possible?
Here is a sample code
\begin{pspicture}(8,8)
\def\psxlabel#1{\bold #1}
\psaxes[]{->}(4,4)(0.1,0.1)(7.8,7.8)
\put(3.8,7.8){$y$}
\put(7.8,3.7){$x$}
\multido{\n=2+1}{5}{
\psline(1,\n)(7,\n)
\psline[linestyle=dashed](\n,7)(\n,1)
}
\end{pspicture}
I thought if I applied "\def\psxlabel blah.." as noted in the
documentation then I could get x labels that are bold (is there a
parameter that applies to both labels.. so like \pslabel instead of
psxlabel?). Can anyone help me with this problem?
Sincerely,
Jose Capco
> I thought if I applied "\def\psxlabel blah.." as noted in the
\pshlabel, there is no \psxlabel
> documentation then I could get x labels that are bold (is there a
> parameter that applies to both labels.. so like \pslabel instead of
> psxlabel?). Can anyone help me with this problem?
wher is the sense to put such labels over the axes??
Herbert
\documentclass{article}
\usepackage{pst-plot,multido}
\makeatletter
\def\pst@@hlabels{%
\vbox to\z@{\vss
\ifnum\pst@cnta<\z@
\pst@dimb=-\pst@dimb
\fi
\hbox to\z@{%
\ifshoworigin\hbox to \z@{\hss\pshlabel{\psk@Ox}\hss}\fi
\mmultido
{\n=\psk@Ox+\psk@Dx}%
{\pst@cnta}%
{\hskip\pst@dimb\hbox to \z@{\hss\pshlabel{\n}\hss}}%
\hss}%
\ifdim\pst@dimd>\z@\vss\else\vskip\pslabelsep\fi}}%
\def\pshlabel#1{\kern1.5em$\mathbf{#1}$}
\makeatother
\begin{document}
\begin{pspicture}(8,8)
\psaxes{->}(4,4)(0.1,0.1)(7.8,7.8)
\uput[0](4,7.8){$y$}
\uput[-90](7.8,4){$x$}
\multido{\n=2+1}{5}{%
\psline(1,\n)(7,\n)
\psline[linestyle=dashed](\n,7)(\n,1)
}
\end{pspicture}
\end{document}
--
http://PSTricks.de/
http://TeXnik.de/
http://www.dante.de/CTAN/info/math/voss/mathmode/Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes
\renewcommand{\pshlabel}[1]{\bfseries #1}% for x-axis
\renewcommand{\psvlabel}[1]{\bfseries #1}% for y-axis
> (2) How to change the positioning of the labels from the tickmarks. I
> mean, if I want the horizontal labels to be -3pt RIGHT from each tick
> (NOT -3pt away from it!) how is that possible?
AFAIK, the only way to do that is to rearrange the order of the
coordinates you give to \psaxes until you get what you want. According
to the manual, if you specify
\psaxes(x0,y0)(x1,y1)(x2,y2)
then picture a rectangle formed by (x1,y1) and (x2,y2); the labels will
be placed on the sides of the axes defined by (x1,y1). The manual admits
that there are situations where this will be ambiguous and recommends
messing with order of the coordinates until you get what you want. Not
very elegant, but you should be able to find something that works
eventually.
I wouldn't be surprised if Herbert Voss comes by later with a better
solution, though....