Questions tagged [pdfpages]

A Python method, in matplotlib, for generating a pdf with multiple pages or a Latex package for inserting external pdf documents.

is either a Python method for generating a pdf with multiple pages or a Latex package for inserting external pdf documents.

If the question relates to the Python method it should usually be tagged with both and . If it relates to the Latex package it should be tagged with .

Further reading:

60 questions
1
vote
0 answers

plots in A4 size pdf

I want (8,6) or any other customized size plots depending on datatype on A4 or letter size pdf. I wrote the attached code where I set the figure size inside plt.subplots(figsize=(width, height)). I can set plt.subplots(figsize=(8.27 x 11.69)) which…
ZVY545
  • 384
  • 1
  • 13
1
vote
1 answer

How to correctly set a fancy header and footer in a included pdf, which contains many pages?

Last time I tried to add fancy header and footer in my document, but I'm not happy of it's result. How to correctly set a fancy header and footer in a included pdf, which contains many pages? My goal, which I want achieve, is: If the number of page…
constantin_d
  • 57
  • 1
  • 7
1
vote
1 answer

Pivot table for loop multiple plots export using pdf pages

Using pdf pages below results in a pdf without the plots. Is it possible to resolve this for plots from pivot tables? import seaborn as sns titanic = sns.load_dataset('titanic') import matplotlib.backends.backend_pdf pdf =…
IOIOIOIOIOIOI
  • 277
  • 3
  • 15
1
vote
0 answers

split a year of data per month (with subplots)

I have a lot of data to analyze, where I want to split it per month. I managed to get a pdf per dataset, but I want to group it per month. Right now I have to split the csv data per month, which is not very efficient. First I make a subplot of the…
peter
  • 21
  • 4
1
vote
1 answer

Plot graphs from pandas with a url somewhere on the plot

I'm trying to find a way to plot many graphs in python with a clickable url corresponding to each graph (could be in the title?) At the minute I'm working with pandas dataframes, using below code: with PdfPages("output.pdf") as pdf: for df in…
1
vote
1 answer

Multiple files, multiple plots saved to a multipage, single pdf file

I am working with >100 csv files while I am opening and plotting in a loop. My aim is to save each plot on a pdf page and generate a big pdf file with each page containing plot from a single file. I am looking at these examples - (1) and (2). Trying…
1
vote
0 answers

Append figure and/or text to existing pdf in a new page (python)

I want to call a function that plots data in a pandas dataframe and appends the plot to an existing pdf file. def plot_and_pdf(df,pdf_file): f, (ax1, ax2) = plt.subplots(2, 1,figsize=(15,8),sharex=True) pp = PdfPages(pdf_file) …
user50473
  • 165
  • 1
  • 7
1
vote
1 answer

How to add dataframe to pdf file using pdfpages

I have been trying to find a way to add dataframe in a pdf file using pdfpages. But I did not find any opt solution yet. My dataframe has around 5k rows and 10 columns. How do i append it to pdf? The code I have written gives a very blurry and small…
slous
  • 11
  • 1
  • 2
1
vote
1 answer

Error while saving a matplolib plot to pdf

I am tryiny to save my matplotlib.pyplots to a pdf. I am using PdfPages for it. plot gets saved for : pdf = PdfPages("Minion Plots - May 22.pdf") fig =…
chink
  • 1,505
  • 3
  • 28
  • 70
1
vote
3 answers

How to make a 1-cell table headers with Matplotlib?

I am using Matplotlib's PdfPages to plot various figures and tables from queried data and generate a Pdf. I want to group plots by various sections such as "Stage 1", "Stage 2", and "Stage 3", by essentially creating section headers. For example,…
Jane Sully
  • 3,137
  • 10
  • 48
  • 87
1
vote
2 answers

Captions for matshow()s in multiple-page pdf

I have been around this problem for quite a long time but I'm not able to find an answer. So, I have a list with matrices which I want to plot (for the sake of this question I'm just having 2 random matrices: list = [np.random.random((500, 500)),…
tjiagoM
  • 448
  • 2
  • 10
  • 23
1
vote
1 answer

matplotlib PdfPages: can we compress or rasterize image?

It appears as though the default behavior of savefig in PdfPages will save a vectorized image (each data point is an object) leading to large file size and slow loading/rendering. Can we save a rasterized image (e.g. PNG) so that it renders…
user3450049
  • 825
  • 1
  • 10
  • 20
1
vote
2 answers

Python 3.4 MatPlotLib PdfPages Value Error

I keep trying to follow the examples I see for PdfPages but keep getting the value error: No such figure: None. plot1 = Chart Generating Function(argument1, argument2,...) from matplotlib.backends.backend_pdf import PdfPages pp =…
Dance Party
  • 3,459
  • 10
  • 42
  • 67
1
vote
0 answers

Accessing axes using PdfPages in groupby plot

With given DF I would like to save all plots (one month per page) in one pdf file. Example DataFrame: %matplotlib inline import pandas as pd import numpy as np import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import…
Michal
  • 1,927
  • 5
  • 21
  • 27
1
vote
1 answer

Errors writing multiple figures to a .pdf

When generating a pdf from the below dataframes and series, pandas is generating two blank figures and inserting them into my .pdf file. Figure 1 and Figure 3 are both blank while Figure 2 and Figure 4 are printing to the .pdf file. I had hoped to…
unique_beast
  • 1,379
  • 2
  • 11
  • 23