[tlocoh-info] Error in plot.new(): figure margins too large
Andy Lyons
lyons.andy at gmail.com
Sun May 5 05:10:38 CEST 2019
Hi Gina,
Thanks for heads-up on the plot error message. Yes that's a fairly
common error message with RStudio, and is usually caused by the plot
window being too small. In fact that's the only time I've ever
encountered it. Very weird to see it in Rmd output. If increasing the
size of the plot window doesn't work, something else might be going on.
I just did a test of plotting in RStudio and this worked fine:
mycon <-
url("http://tlocoh.r-forge.r-project.org/toni.n5775.2005-08-22.2006-04-23.lxy.RData")
load(mycon); close(mycon)
plot(toni.lxy)
See if that works for you.
Something else you could try would be to run dev.new() before you run a
plot command. This will open a new plot window and make it active for
subsequent plot commands. To print in RStudio again, run dev.off() or
just close the window.
If none of the above helps, there might be something else going on,
maybe a DPI setting or something like that. If I can reproduce the
problem I could look more closely (but I won't have time to look at it
until probably June). You can also look at the code in the plot
functions and comment out any lines that deal with margins. Or you could
also simply plot the points with your own commands - under the hood the
locations are simply a SpatialPointsDataFrame object and the hulls and
isopleths are simply SpatialPolygonsDataFrame objects (see the Vignette
on the data structure).
Cheers,
Andy
On 5/3/2019 6:51 AM, Gina Joue wrote:
> Hi,
>
> I know the error
> ----------------------------------------------
> Error in plot.new(): figure margins too large
> -----------------------------------------------
>
> is probably a problem that is not specific to the tlocoh package, but
> I'm getting it only when plotting lxy objects, so I thought perhaps
> others using the package might have come across this and know how to
> deal with it. I don't get it with hist() but so far with plot(),
> lxy.plot.freq(), and lxy.plot.sfinder().
>
> I've tried the following suggestions posted in other R forums:
> * set the margins smaller than what it is set at
> * restarted the graphics device with dev.off() before plotting
> * increased the size of the plot window
> * Actually I'm running plots within R-markdown, which apparently should
> not be prone to this error because it's configured to plot to full paper
> size (is that right?), but in any case, I've tried it within the Rmd
> file with that panel at maximum size as well as at the console with the
> plot window at max)
>
> Help?
> Thanks in advance,
> Gina
> --
>
> _____________________________________________________________________
>
> Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de
> Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Marya Verdel
> _____________________________________________________________________
>
> SAVE PAPER - THINK BEFORE PRINTING
> _______________________________________________
> Tlocoh-info mailing list
> Tlocoh-info at lists.r-forge.r-project.org
> http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info
--
*T-LoCoH*: A hull-based method for home range construction and
spatiotemporal analysis of movement data.
Lyons, A., Turner, W.C., and WM Getz. 2013. Home Range Plus: A
Space-Time Characterization of Movement Over Real Landscapes. BMC
Movement Ecology 1:2 <http://www.movementecologyjournal.com/content/1/1/2>.
http://tlocoh.r-forge.r-project.org
/I often get overwhelmed with emails, so if I don't reply to your email
within 5 days, I may have missed it. Please resend./
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/tlocoh-info/attachments/20190504/6e3d3ee9/attachment.html>
More information about the Tlocoh-info
mailing list