papaja
papaja copied to clipboard
Figure size being ignored
Describe the bug Chunk options fig.width and fig.height don't seem to affect the PDF (and are not visible in the .tex file).
To Reproduce
Preamble:
---
title : "Title"
shorttitle : "short title"
date : "`r format(Sys.time(), '%B %d, %Y')`"
author:
- name: BLUB
affiliation: '1'
corresponding: yes
address: 'Department of amazing things'
email: '[email protected]'
- name: BLIB
affiliation: '2,3'
affiliation:
- id: '1'
institution: A
- id: '2'
institution: B
- id: '3'
institution: C
authornote: |
We are grateful to ### ommitted for review
abstract: |
People ...
keywords : "kw1; kw2; kw3"
wordcount : "X"
bibliography : ["../latex-stuff/library.bib"]
link-citations : yes
csl : ../latex-stuff/apa-6th-edition.csl
floatsintext : yes
figurelist : no
tablelist : no
footnotelist : no
linenumbers : yes
numbersections : false
mask : no
draft : no
header-includes:
- \usepackage{animate}
- \usepackage{amsmath}
- \usepackage{tikz}
- \usetikzlibrary{bayesnet}
- \usepackage{booktabs}
- \usepackage{siunitx}
- \usepackage{soul}
- \usepackage{tabto}
- \usepackage{xcolor}
- \usepackage{colortbl}
- \usepackage{placeins}
- \setstcolor{red}
- \usepackage{sectsty}
- \sectionfont{\color{black}}
- \subsectionfont{\color{black}}
- \subsubsectionfont{\color{black}}
- \usepackage{setspace}\doublespacing
- \usepackage{subfig}
- \usepackage{lscape}
- \usepackage{pdflscape}
documentclass : "apa6"
classoption : "man"
fontsize : 11pt
output:
papaja::apa6_pdf:
latex_engine: xelatex
extra_dependencies: "subfig"
includes:
in_header: ../latex-stuff/header.tex
always_allow_html: true
---
with chunk (three tic marks omitted since I couldn't figure out how to post this:
```{r test, fig.width=1, fig.height=1, fig.align='center'}
library(tidyverse)
data(diamonds)
diamonds %>%
ggplot(aes(x = depth, y = price, color = color)) + geom_point()
```
Expected behavior I would expect a 1in by 1in plot. So, about 1/11th of the page height and 1/8th of the page width. But the resulting plot seems much larger, about 1/2 of the page height and more than 1/2 of the page width. Perhaps something is off in the unit conversion?
Screenshots