Graphics, Figures & TablesPSTricks | Setting logarithmic Axes

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
argan
Posts: 18
Joined: Thu May 05, 2011 10:46 am

PSTricks | Setting logarithmic Axes

Post by argan »

Hi,

I have a figure where the data points for the X-interval are in the interval [0.02 1], and I wish to plot this in a log-log plot. From the documentation, I understand that setting the origin of the axes in the psaxes options is done as e.g.

Code: Select all

psaxes[... Ox = -1, Oy = -1]
if I want to have origin of X and Y at 1e-1. But how do I do it if I want the plot to start at 0.02? I find no mention of this.

Recommended reading 2024:

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

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

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

PSTricks | Setting logarithmic Axes

Post by localghost »

I suggest to take a look at the manual of the pst-plot package. And for an adequate problem description you should provide a minimal example. It will increase your chance for good and fast answers significantly.


Thorsten
argan
Posts: 18
Joined: Thu May 05, 2011 10:46 am

Re: PSTricks | Setting logarithmic Axes

Post by argan »

Hi,

The documentation doesn't really say anything related to this. I'll try to provide som kind on MWE.

Thanks
Björn
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

PSTricks | Setting logarithmic Axes

Post by localghost »

argan wrote:[…] The documentation doesn't really say anything related to this. […]
Au contraire. The manual does this very well. See Section 9.20 for details and examples.
argan
Posts: 18
Joined: Thu May 05, 2011 10:46 am

Re: PSTricks | Setting logarithmic Axes

Post by argan »

Hi,

I've looked at this section and not found anything really related to my problem. All I want is to set the origin of the x-axis to 0.02 (not 0.01) with the Ox command. But the only thing I find related to this is that to set it to 0.01, I use Ox = -2, because 1e-2 is 0.01.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

PSTricks | Setting logarithmic Axes

Post by localghost »

What about preparing the minimal example you have already been asked for? Just in case you are interested in specific help instead of random shots.
argan
Posts: 18
Joined: Thu May 05, 2011 10:46 am

PSTricks | Setting logarithmic Axes

Post by argan »

Sorry for the time it took, but here it is:

Code: Select all

\documentclass[a4paper,11pt]{article}
% define the title
\author{B.~Fallqvist}
\title{MWE}\usepackage{graphicx,float,amssymb,dblfloatfix}
\usepackage[fleqn]{amsmath}
\usepackage{pstricks,pst-plot,pstricks-add,pst-grad,pst-node,pst-tree}
\begin{document}
\newcommand{\testnumbers}{
0.02 0.1
0.1 1
1 10
10 100}
\begin{titlepage}
% generates the title
\maketitle
% insert the table of contents
\end{titlepage}
\newpage
\section{MWE}
\begin{figure*}
	\centering
	\psset{xunit=3.6cm,yunit=1.0cm}	
		\begin{pspicture}(0,-1)(-2,2)
		\pstScalePoints(1,1){log}{log}
			\listplot[linecolor=blue,linewidth=0.5pt]{\testnumbers}
			\psaxes[subticks=10,axesstyle=frame,xylogBase=10,logLines=all,ticksize=5pt,tickstyle=inner,linewidth=0.5pt,Ox=-2,Oy=-1]{->}(-2,-1)(1,2)																	
		\end{pspicture}
\end{figure*}
\end{document}
Now, all I want to do is set the x-axis to start where the line starts, that is at 0.02 instead of 0.01. How do I do that?

Thanks
Post Reply