Questions tagged [figure]

A container for images, plots or other graphical elements with some optional meta-information.

A figure is a container that encompasses graphical elements in a larger context.

Matlab

From the official docs:

A figure is a MATLAB window that contains graphic displays (usually data plots) and UI components. You create figures explicitly with the figure function, and implicitly whenever you plot graphics and no figure is active."

LaTeX

A figure is a kind of float, a container for things that can't be split over different pages. A figure is define with the equally named environment.

HTML5

The <figure> Element represents self-contained content, frequently with a caption (), and is typically referenced as a single unit. (From the Mozilla HTML docs)

1521 questions
18
votes
1 answer

How to make more than 10 subplots in a figure?

I am trying to make a 5x4 grid of subplots, and from looking at examples it seems to me that the best way is: import matplotlib.pyplot as plt plt.figure() plt.subplot(221) where the first two numbers in the subplot (22) indicate that it is a 2x2…
Sam V
  • 323
  • 1
  • 2
  • 6
17
votes
4 answers

matlab: scatter plots with high number of datapoints

I'm trying to plot scatter, something like: scatter(coor(:, 2), coor(:, 3), 1, coor(:, 4)); The problem is, that I have quite big number of coordinates to plot (~100 000). Its taking long time to plot it, and when I try to export figure to tiff -…
Art
  • 1,196
  • 5
  • 18
  • 34
16
votes
2 answers

Enable white frames on matplotlib figure/ Disable transparent frames

I'm running ipython notebook on a dark theme. When I build a chart on this, the chart is white, but the frame is transparent (hence dark), hiding the ticks which are also dark. Is there a way to make the frame not transparent/ white? The ticks are…
Rocky Li
  • 5,641
  • 2
  • 17
  • 33
15
votes
3 answers

How to place the figure at the bottom of page in latex?

I am having problem in placing the figure at the bottom of page in latex. When I specify the \begin{figure*}[b], all the figures in my documents goes at the end of document. What I need is just place one specific figure at the bottom of current page…
ms110400027
  • 173
  • 1
  • 1
  • 9
15
votes
2 answers

Show only selected or specific matplotlib figures

I am generating a total of 50+ figures but I do not wish to display them all. I would like to pick out the figures that I want to display. Is there any way to do it? For example: I have 50 plots which are generated over the course of the program. At…
Karthik Venkatesh
  • 329
  • 2
  • 3
  • 8
15
votes
2 answers

Plot Overlay MATLAB

How do you take one plot and place it in the corner (or anywhere for that matter) of another plot in MATLAB? I have logarithmic data that has a large white space in the upper right-hand side of the plot. In the white space I would like to overlay…
ServAce85
  • 1,602
  • 2
  • 23
  • 51
14
votes
1 answer

Save MATLAB figure with different background color

I want to print a MATLAB figure with a dark background and white labels. If I use the print or saveas command I lose somehow the colors. The plot symbols are dark again and the background is white. points =…
Thomas
  • 269
  • 1
  • 5
  • 12
14
votes
1 answer

How do you get the current figure number in Python's matplotlib?

I'm playing around with an example script that shows how to switch back and forth between figures. I found the example here: http://matplotlib.org/examples/pylab_examples/multiple_figs_demo.html When I try to print out the figure number I get…
R. Wayne
  • 417
  • 1
  • 9
  • 17
14
votes
3 answers

How to put the title at the bottom of a figure in matplotlib?

I use matplotlib to plot a figure with four subfigures, and set_title method put the title ( (a) (b) (c) (d)) on the top of every subfigure, see the following code example. fig = pyplot.figure() ax = fig.add_subplot(1, 4,…
Huayi Wei
  • 829
  • 1
  • 7
  • 16
14
votes
1 answer

How to combine several matplotlib figures into one figure?

I have several matplotlib Figure-objects that I want to combine to one large figure by placing them next to another. How to get them into one figure? How to make them the same height? Note that I cannot change the way the individual figures are…
Se Norm
  • 1,715
  • 5
  • 23
  • 40
14
votes
1 answer

pictorial chart in r

I am trying to develop pictorial charts. Is it possible to develop such charts in R ? myd <- data.frame (categories = c("Planes", "Ships", "Cars", "Trains"), values = c(15, 18, 22, 11)) Component icons are here:
fprd
  • 621
  • 7
  • 21
14
votes
2 answers

Reducing the size of pdf figure file in matplotlib

In matplotlib, I am using LineCollection to draw and color the countries, where the boundaries of the counties are given. When I am saving the figure as a pdf file: fig.savefig('filename.pdf',dpi=300) the figure size are quite big. However, on…
imsc
  • 7,492
  • 7
  • 47
  • 69
13
votes
3 answers

Title over group of subplots

there are many subplots and each subplot has its own title. how can add a title over all of these group of subplots? I want this title to be shown at top center. x = linspace(-5,5); y1 = sin(x); subplot(2,5,[1:2]) plot(x,y1) title('y=sin(x)') y2 =…
Sadegh
  • 865
  • 1
  • 23
  • 47
13
votes
2 answers

Interactive(?) plotting in Spyder with matplotlib

I am trying to migrate over to Python from Matlab and can't figure out how to get interactive(?) plotting working within the Spyder IDE. My test code is shown below. With the .ion() nothing happens, I get a quick flash of a figure being drawn then…
Daniel
  • 3,344
  • 5
  • 27
  • 35
12
votes
2 answers

Get title of current figure in MATLAB?

I have a figure opened with a certain title. How do I get the title string? I have tried get(gcf) but I don't know how to navigate to the title. I want to get the title of many figures, add some more characters to the string and write it back.
dewalla
  • 1,317
  • 8
  • 18
  • 42