s-news
[Top] [All Lists]

log plotting problems

To: s-news@lists.biostat.wustl.edu
Subject: log plotting problems
From: Scott Saleska <saleska@email.arizona.edu>
Date: Tue, 22 Feb 2005 18:01:07 -0500
Until today, I have never had a problem with executing commands like the ones below to make semi-log or log-log plots:

plot( x,y, log='xy', xaxt='n')   # make log-log plot
tick.seq <- c(1:10, seq(20,100,by=10), seq(200,1000,by=100), seq(2000,10000, by=1000))   # tick locations on log axis
axis(1, at=tick.seq, labels=F, tck=-0.01)     # minor ticks
axis(1, at=10^(0:4), labels=T, tck=-0.02)     # major ticks with labels
lines( x,y, col=2)  # overlay points with colored lines

This was handy, because you don't have to log-transform everything to plot it on the log-scaled plot. 

Today, however, the process seems to have gone abruptly haywire.  Sometimes it works, sometimes the plotting routine seems to forget that the graph was plotted on log scale, and plots the numbers as if they were powers of 10:  x=1 gets plotted at the x=10^1 position (instead of x=10^0).   While it is in this alternate mode, in order for the graph to work properly I have to do:

lines( log10(x), log10(y), col=2)  # overlay points with colored lines

Then, seemingly arbitrarily, it will go back to working fine. 

It is as if some switch is being turned off and one without my knowing what it is.  I have tried exiting Splus and restarting, opening a new plotting window via graphsheet(), etc.  These do not work to fix the problem, but eventually it seems to work again (for awhile). 

Any advice on this perplexing problem would be greatly appreciated. 

I am using Splus 6.2 for Windows (Rev date 2 Dec 2003, Build 6713)
with OS:  Windows XP Professional (SP 2)



********
Scott R. Saleska, Ph.D.

NOTE NEW ADDRESS and EMAIL: 

Assistant Professor, Ecology and Evolutionary Biology
University of Arizona
Tucson, AZ 85721

(520) 626-1500
saleska@email.arizona.edu

http://eebweb.arizona.edu/faculty/saleska/

<Prev in Thread] Current Thread [Next in Thread>
  • log plotting problems, Scott Saleska <=