figures

How to find byte sizes of R figures on pages?

落花浮王杯 提交于 2019-12-06 09:28:31
I would like to monitor the basic quality of the figures produced in R on individual pages such as byte size of each page, ... I can now do only quality assurance of average pages, see the following chapter about it. I think there must be something builtin for the task than average measures. Code which produces 4 pages in Rplots.pdf where I would like to know the byte size of each page in an output here; any other statistics of the page outputs is also welcome; you can get the basic memory monitoring by objects here but I would like it to correspond to the outputs in PDF # https://stat.ethz.ch

How to force image to text when converting markdown to pdf using pandoc

孤者浪人 提交于 2019-12-05 08:34:10
I made a GitHub wiki - a manual to a software package - and I want to transform it into a beautiful pdf manual. However, I have some trouble with figures - many of them are put in one of the following pages, much after the place in the text where it should be, what turns the document very difficult to read. To do so, I followed basically what was suggested here . Basically the idea is to: Clone the GitHub wiki; Convert the markdown files to a single pdf using pandoc: pandoc -s FirstSection.md FirstSection.md FirstSection.md -o manual.pdf What happens is that I have a sequence of short

How do I ensure that my matplotlib axes are of a custom class?

非 Y 不嫁゛ 提交于 2019-12-05 01:36:30
问题 I have a custom figure class and would like to ensure that all of the axes associated with it, whether created with subplots() or twinx() , etc. have custom behaviors. Right now I accomplish this by binding new methods to each axis after it has been created, e.g. by using import types def my_ax_method(ax, test): print('{0} is doing something new as a {1}.'.format(ax, test)) class MyFigure(matplotlib.figure.Figure): def __init__(self, **kwargs): super(MyFigure, self).__init__(**kwargs) axes_a

Script to save matlab figures to a specified directory

时光怂恿深爱的人放手 提交于 2019-12-04 18:28:01
问题 Suppose I have several figures open in matlab. I would like some function I can call, e.g save_all_figures_to_directory('dir_name') , that would iterate over all figures and save them to the specified folder. How do I do this? 回答1: You can use the Matlab function findobj: function save_all_figures_to_directory(dir_name) figlist=findobj('type','figure'); for i=1:numel(figlist) saveas(figlist(i),fullfile(dir_name,['figure' num2str(figlist(i)) '.fig'])); end end 来源: https://stackoverflow.com

How do I ensure that my matplotlib axes are of a custom class?

天涯浪子 提交于 2019-12-03 16:26:01
I have a custom figure class and would like to ensure that all of the axes associated with it, whether created with subplots() or twinx() , etc. have custom behaviors. Right now I accomplish this by binding new methods to each axis after it has been created, e.g. by using import types def my_ax_method(ax, test): print('{0} is doing something new as a {1}.'.format(ax, test)) class MyFigure(matplotlib.figure.Figure): def __init__(self, **kwargs): super(MyFigure, self).__init__(**kwargs) axes_a = None axes_b = None axes_c = None def setup_axes(self, ax): self.axes_a = ax self.axes_b = self.axes_a

In LaTeX, is there a way to put a float automatically after where it is first referenced?

拜拜、爱过 提交于 2019-12-03 07:58:28
问题 I am currently writing a long one-column document that contains a lot of floats (figures and tables). I know the usual b/h/p/t options for placing floats in latex. However, I was wondering if there exists a package or macro that would let me do the following automatically: place a float automatically right after it was first reference. So if the reference appears on the top of page x, then the float would most likely appear at the bottom of page x, or maybe at (the top of) page x+1. In any

Is there a way to get LaTeX to place figures in the same page as a reference to that figure?

假如想象 提交于 2019-12-03 04:44:16
问题 I am using LaTeX and the figure environment. I am well familiar with the parameters to that environment: [htbp], and I am also generally familiar with the strategies that LaTeX takes, by default, to decide where to put each figure. For example, by placing figures at the top or bottom of the page. What I am wondering is whether there is a package, macro, or some commands that I can give so that if I have a single-column document and I mostly have a single in-text reference to a figure, that

How to make a hyperlink navigate to the top of the figure in LaTeX when using hyperref?

安稳与你 提交于 2019-12-03 04:15:13
问题 I have a LaTeX document with a figure and references to it: \begin{figure} ... \caption{...} \label{fig:1} \end{figure} \ref{fig:1} I use the hyperref package to get hyperlinks in the resulting PDF. However the link to the figure navigates to the caption leaving the figure itself out of the view. How can I make it navigate to the start of the figure instead without moving the caption to the top? 回答1: Add this in your preamble \usepackage{hyperref} \usepackage[all]{hypcap} %for going to the

In LaTeX, is there a way to put a float automatically after where it is first referenced?

て烟熏妆下的殇ゞ 提交于 2019-12-02 20:41:40
I am currently writing a long one-column document that contains a lot of floats (figures and tables). I know the usual b/h/p/t options for placing floats in latex. However, I was wondering if there exists a package or macro that would let me do the following automatically: place a float automatically right after it was first reference. So if the reference appears on the top of page x, then the float would most likely appear at the bottom of page x, or maybe at (the top of) page x+1. In any case it should not occur before the reference. I know that this may be hard to achieve but then I am not

Is there a way to get LaTeX to place figures in the same page as a reference to that figure?

匆匆过客 提交于 2019-12-02 17:56:35
I am using LaTeX and the figure environment. I am well familiar with the parameters to that environment: [htbp], and I am also generally familiar with the strategies that LaTeX takes, by default, to decide where to put each figure. For example, by placing figures at the top or bottom of the page. What I am wondering is whether there is a package, macro, or some commands that I can give so that if I have a single-column document and I mostly have a single in-text reference to a figure, that the figure would be more likely to be placed in the same page of the reference? For example, imagine that