Questions tagged [figures]

91 questions
113
votes
7 answers

prevent plot from showing in jupyter notebook

How can I prevent a specific plot to be shown in Jupyter notebook? I have several plots in a notebook but I want a subset of them to be saved to a file and not shown on the notebook as this slows considerably. A minimal working example for a Jupyter…
gota
  • 2,338
  • 4
  • 25
  • 45
67
votes
4 answers

How do I get the handles of all open figures in MATLAB

I have nine open figures in matlab (generated by another function) and I want to print them all to file. Does anyone know how to grab the handles of all open figures in MATLAB? I know about gcf but it doesn't seem to do what I want.
Liz
  • 673
  • 1
  • 5
  • 4
39
votes
3 answers

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

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…
vitaut
  • 49,672
  • 25
  • 199
  • 336
38
votes
9 answers

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

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…
Uri
  • 88,451
  • 51
  • 221
  • 321
36
votes
3 answers

Centering only header of LaTeX table

I'd like to center just the header, but not the body of particular columns in a table. For example: \begin{table}[!t] \centering \caption{ \bf{My table}} \begin{tabular}{l|c|} ... \end{tabular} \end{table} will make a left-aligned column, and a…
user248237
32
votes
3 answers

Python with matplotlib - drawing multiple figures in parallel

I have functions that contribute to small parts of a figure generation. I'm trying to use these functions to generate multiple figures? So something like this: work with Figure 1 do something else work with Figure 2 do something else work with…
aspade
  • 575
  • 1
  • 6
  • 10
22
votes
1 answer

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

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…
user66237
  • 793
  • 1
  • 5
  • 19
16
votes
3 answers

knitr: include figures in report *and* output figures to separate files

Not only would I like my figures to appear in my knitr-generated report, but I would also like to output them to separate files, too. To do this, I have included code like the following: ```{r} #Plot figure in report plot(x,y) #Plot figure in…
Dan
  • 11,370
  • 4
  • 43
  • 68
10
votes
1 answer

Script to save matlab figures to a specified directory

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?
olamundo
  • 23,991
  • 34
  • 108
  • 149
8
votes
2 answers

Close all figures when a script is running in Matlab

Assume that a script is running in Matlab. Is there any way to close all figures? (Closing each figure individually is tedious, and since the script is running I cannot add close all to it.)
Franck Dernoncourt
  • 77,520
  • 72
  • 342
  • 501
8
votes
2 answers

Close all figures in MATLAB, except specific ones.

I am trying to determine if there is a nice way, to close all figures in MATLAB, except for one(s) that I determine before hand, are not to be closed. Is there such a way to do this? I am finding that I am wasting a lot of time chasing down…
Spacey
  • 2,941
  • 10
  • 47
  • 63
7
votes
5 answers

ggplot2 multiline title, different indentations

I am generating graphs for a publication and I'd like to be able to label the panels of a figure in ggplot itself (as opposed to exporting to publisher, etc) so that they just fit neatly together in the final document. I was going to try to do this…
7
votes
1 answer

Rendering and image quality in MATLAB figures

I have a contour plot and I am using the current rendering: set(gcf, 'renderer', 'zbuffer'); but it is giving me this thick red line in the plot and I don't know how to get rid of it. I tried switching to: set(gcf, 'renderer', 'opengl'); but the…
mikanil
6
votes
3 answers

MATLAB - best way to dynamically update a line handles' XData and YData?

I am collecting data and plotting that data in real time. The data are produced by a motion capture system. I have one class DynamicDataset that is just a wrapper around a 2-column matrix (although it's more nuanced than that) with an event notifier…
Dang Khoa
  • 5,693
  • 8
  • 51
  • 80
6
votes
3 answers

Add extra whitespace to matlab legend (for use with psfrag)

How to pad white-space on a matlab legend to the right of the text? I am using a combination of psfrag (and adobe illustrator for a few other diagram modifications), and will replace the placeholder text in a figure with an equation. The problem…
jlperla
  • 201
  • 2
  • 8
1
2 3 4 5 6 7