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
57
votes
1 answer

How to change plotly figure size

I have made a scatter plot using matplotlib and Plotly. I want the height, width and the markers to be scatter as in matplotlib plot. Please see the attached plots. I used the following code in Plotly import plotly import plotly.plotly as py from…
hemanta
  • 1,405
  • 2
  • 13
  • 23
56
votes
3 answers

Subfigs of a figure on multiple pages

I am facing problem of stacking many figures The problem is the stack figure is overriding the page dimension vertically and placing all the figure in one page and not changing the page as the limitation of page is reached. How can page be changed…
Hemant Ritturaj Kushwaha
52
votes
6 answers

How to create a new figure in MATLAB?

Usually when I plot in MATLAB, it always draws on the same figure. How do I make it draw in a new figure? I know it is pretty elementary, but I'm not finding it using Google Search.
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
43
votes
3 answers

what is the usage of HTML5 figure with img

Is there any specific advantage/usage of using HTML5
over ? I think
is useless without , isn't it? It will be helpful if explain with an example.
xkeshav
  • 53,360
  • 44
  • 177
  • 245
42
votes
7 answers

matplotlib savefig in jpeg format

I am using matplotlib (within pylab) to display figures. And I want to save them in .jpg format. When I simply use the savefig command with jpg extension this returns : ValueError: Format "jpg" is not supported. Supported formats: emf, eps, pdf,…
cedm34
  • 493
  • 1
  • 5
  • 5
42
votes
4 answers

Matlab: How to obtain all the axes handles in a figure handle?

How do I obtain all the axes handles in a figure handle? Given the figure handle hf, I found that get(hf, 'children') may return the handles of all axes. However, the Matlab Help suggests that it may return more than just the axes handles: Children…
YYC
  • 1,792
  • 1
  • 14
  • 19
39
votes
3 answers

Understanding matplotlib: plt, figure, ax(arr)?

I'm not really new to matplotlib and I'm deeply ashamed to admit I have always used it as a tool for getting a solution as quick and easy as possible. So I know how to get basic plots, subplots and stuff and have quite a few code which gets reused…
daniel451
  • 10,626
  • 19
  • 67
  • 125
39
votes
4 answers

How can I rotate a matplotlib plot through 90 degrees?

I have created a figure in matplotlib which contains three subplots, one in the top left quadrant, one in the top right quadrant, and one in the bottom right quadrant. The top right figure contains a two-d image, and the other two plots are the…
user3443148
  • 411
  • 1
  • 4
  • 5
39
votes
2 answers

How to import local image using knitr for markdown

I have an externally created png image in a local directory that I'd like to import to a report using knitr. The ultimate target filetype is html. I have no trouble getting my own figures to appear when I create them with R code, but I'm at a loss…
Steve Buyske
  • 393
  • 1
  • 3
  • 4
38
votes
7 answers

How to save a figure in MATLAB from the command line?

Is there a command in MATLAB which allows saving a figure in FIG or JPEG or both formats automatically?
ABC-biophi
  • 505
  • 1
  • 4
  • 10
37
votes
2 answers

ipython : get access to current figure()

I want to add more fine grained grid on a plotted graph. The problem is all of the examples require access to the axis object. I want to add specific grid to already plotted graph (from inside ipython). How do I gain access to the current figure and…
sten
  • 7,028
  • 9
  • 41
  • 63
34
votes
3 answers

Adding full page figures in Latex, how?

I have a full-page figure that LaTeX keeps putting at the end because of its size. I would like it to be integrated on a separate page in the flow of text. How can I do it?
Víctor
  • 637
  • 2
  • 7
  • 14
32
votes
4 answers

How to change the order of lines in a Matlab figure?

Given a plot of three curves in a .fig file I'd like to add another plot (with hold all and plot), but put it behind one of the already existing curves (i.e. make sure the last original curve stays the foreground one). Can this be achieved without…
Tobias Kienzler
  • 25,759
  • 22
  • 127
  • 221
31
votes
2 answers

Latex - Inserting a reference in a figure's caption

In Latex, I want to add a reference in the legend of a figure, like: \begin{figure} ... \caption{This is the legend of this figure (reprinted from \cite{something}).} ... \end{figure} but the citation is not allowed to be placed in the the…
Sérgio
  • 1,093
  • 1
  • 9
  • 14
30
votes
3 answers

Matplotlib Savefig will NOT overwrite old files

This seems like it must be a permissions issue on my machine. After a systems update on Windows 10, when I run: import matplotlib.pyplot as plt #make figure plt.plot([1,2,3,4]) plt.ylabel('some numbers') #save plt.savefig("./figs/my_plot.jpg") It…
EHB
  • 1,127
  • 3
  • 13
  • 24