Graphics, Figures & Tablespst-plot | Let Axes of a Plot disappear

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
aquamarijn
Posts: 8
Joined: Wed Aug 15, 2012 11:37 pm

pst-plot | Let Axes of a Plot disappear

Post by aquamarijn »

Hello Community,

How can I prevent the axes to show in a graph? The option axesstyle=none doesn't seem to work in the following example; the axes do show. Setting linewidth=0mm or linecolor=white isn't a neat solution.

Code: Select all

\documentclass[11pt]{article}
\usepackage{pst-plot,pstricks-add}

\begin{document}
  \begin{pspicture}(-1,-1)(9,6)
    \psaxes[axesstyle=none]{->}(7,5)
  \end{pspicture}
\end{document}
Using MiKTeX 2.9 I have updated all packages.


Thank you,
Jaap
Last edited by Stefan Kottwitz on Thu Aug 16, 2012 7:23 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

pst-plot | Let Axes of a Plot disappear

Post by Stefan Kottwitz »

Hi Jaap,

welcome to the board!

Set linestyle=none, and you could do the same for ticks and labels:

Code: Select all

\psaxes[axesstyle=none,ticks=none,labels=none,linestyle=none]{->}(7,5)
Stefan
LaTeX.org admin
aquamarijn
Posts: 8
Joined: Wed Aug 15, 2012 11:37 pm

pst-plot | Let Axes of a Plot disappear

Post by aquamarijn »

Hello Stefan,

thank you kindly for answering; your suggestion works. I am still puzzled.

Why is axesstyle=none alone not enough? In the book "PSTricks, Grafik mit PostScript für TeX und LaTeX" by Herbert Voss there is an example on page 158 with \psaxes[axesstyle=none](3,2) without linestyle=none. In the book no axes are shown. I do get axes with the same code. The option axesstyle=none seems intended to suppress te axes, why then is linestyle=none also required?


Regards, Jaap
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

pst-plot | Let Axes of a Plot disappear

Post by CrazyHorse »

aquamarijn wrote:Why is axesstyle=none alone not enough? In the book "PSTricks, Grafik mit PostScript für TeX und LaTeX" by Herbert Voss there is an example on page 158 with \psaxes[axesstyle=none](3,2) without linestyle=none. In the book no axes are shown. I do get axes with the same code. The option axesstyle=none seems intended to suppress te axes, why then is linestyle=none also required?
linestyle is not required:

Code: Select all

\psaxes[axesstyle=none,ticks=none,labels=none]{->}(7,5)

will print nothing.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

pst-plot | Let Axes of a Plot disappear

Post by Stefan Kottwitz »

CrazyHorse wrote: linestyle is not required:

\psaxes[axesstyle=none,ticks=none,labels=none]{->}(7,5)


will print nothing.
It does - tested with this code and XeLaTeX, and LaTeX in dvi mode, and pdfLaTeX with auto-pst-pdf via pdf option:

Code: Select all

\documentclass[11pt]{article}
\usepackage{pstricks,pst-plot}
\begin{document}
\begin{pspicture}(-1,-1)(9,6)
\psaxes[axesstyle=none,ticks=none,labels=none]{->}(7,5)
\end{pspicture}
\end{document}
Output:
axes.png
axes.png (1.31 KiB) Viewed 4954 times
Stefan
LaTeX.org admin
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

pst-plot | Let Axes of a Plot disappear

Post by CrazyHorse »

Stefan_K wrote:It does - tested with this code and XeLaTeX, and LaTeX in dvi mode, and pdfLaTeX with auto-pst-pdf via pdf option:
Then you have an old pst-plot version. axesstyle=none already implies that the lines are not drawn. The current version is:

Code: Select all

pst-plot.tex    2012/05/03 1.42 `pst-plot' (tvz,hv)
Herbert
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: pst-plot | Let Axes of a Plot disappear

Post by Stefan Kottwitz »

Hi Herbert,

it's not very old, though not the most current: 2011/04/13 1.29. So it seems to be a recent improvement, good to know for users of TeX Live 2011 and earlier.

I updated and tested with 2012/05/03 1.42 and the lines are gone.

Thanks,

Stefan
LaTeX.org admin
aquamarijn
Posts: 8
Joined: Wed Aug 15, 2012 11:37 pm

pst-plot | Let Axes of a Plot disappear

Post by aquamarijn »

Hello Stefan, Herbert,

thank you for answering my question. Indeed using an old version of pst-plot caused my system to print the axes in spite of the option axesstyle=none. In this episode I also learned how to update my packages using WinEdt and MiKTeX. What a nice first experience in this forum!


Regards,
Jaap
Post Reply