Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8839043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:09:01+00:00 2026-06-14T10:09:01+00:00

With following chunk the left alignment doesn’t work. The resulting map has still the

  • 0

With following chunk the left alignment doesn’t work. The resulting map has still the same left border as without fig.align='left'

\documentclass[a4paper, oneside, british]{book}
\begin{document}
<<chunk.maps, fig.height=12, fig.width=21, out.width="6in", fig.align='left'>>=
library(knitr)
library(maptools)
data(wrld_simpl)
plot(wrld_simpl)
box()
@
\end{document}

I would greatly appreciate any help with this!

Thanks,
Gerit

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:09:02+00:00Added an answer on June 14, 2026 at 10:09 am

    It is not because fig.align="left" does not work; as @joran said in the comments, it does work if you make the plot smaller. There are two problems that caused the artifact:

    1. par(mar) is not 0 on the left margin by default; see ?par; set par(mar = c(0, 0, 0, 0)) solves this problem
    2. the plot was written into a paragraph, which has an amount of indentation by default in LaTeX (\parindent)

    To make the plot touch the left margin, try this:

    \documentclass{book}
    \setlength{\parindent}{0pt}
    \begin{document}
    <<chunk.maps, fig.height=12, fig.width=21, out.width="6in", fig.align='left'>>=
    library(maptools)
    data(wrld_simpl)
    par(mar = c(0, 0, 0, 0))
    plot(wrld_simpl)
    box()
    @
    \end{document}
    

    If you are uncomfortable with setting \parindent to 0, you can restore it after the chunk.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to iterator through a map object using the following chunk of code:
On an ASP.net site at my place of work, the following chunk of code
Following chunk html code works as expected: <iframe src=http://www.amazon.com/></iframe> But when trying embed inner
I have the following chunk of code. It works perfectly. <div id=restaurant_locations></div> <script type=text/javascript>
Java newbie here, I am trying to find the output of the following chunk
I came across the following weird chunk of code.Imagine you have the following typedef:
At the following URL: https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsICacheVisitor is the following code chunk: boolean visitDevice(in string deviceID,
In the following chunk of code: public struct Nullable<T> : IFormattable, IComparable, INullable, IComparable<Nullable<T>>
I have the following chunk of a header file BKE_mesh.h: /* Connectivity data */
Consider a following chunk of service: public class ProductService : IProductService { private IProductRepository

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.