figure

CSS Width:100% not working in Google Chrome

柔情痞子 提交于 2019-12-07 23:15:43
问题 I'm trying to build gallery-section with captions based on figure and figcaptions . It must be responsive and work with different height / width along with its figcaption`. Everything works well in firefox , but unfortunately chrome doesn't follow the 100% width in CSS which is significant. figure { margin: 6px; color: #333; /*display: table; float: left;*/ display: inline-block; -webkit-box-sizing: border-box ; -moz-box-sizing: border-box ; box-sizing: border-box ; } figure figcaption {

Figures occurring after ^ and _ macros (was: LaTeX limitation?)

拟墨画扇 提交于 2019-12-07 14:57:15
问题 I've hit an annoying problem in LaTeX. I've got a tex file of about 1000 lines. I've already got a few figures, but when I try to add another figure, It barfs with: ! Undefined control sequence. <argument> ... \sf@size \z@ \selectfont \@currbox l.937 \begin{figure}[t] If I move the figure to other parts of the file, I can get similar errors on different lines: ! Undefined control sequence. <argument> ... \sf@size \z@ \selectfont \@currbox l.657 \paragraph {A Centering Algorithm} If I comment

<figure>&<figcaption> with floating image, figcaption wraps, and article text wraps around image/caption

眉间皱痕 提交于 2019-12-07 10:12:45
问题 Searched the web for weeks but can't find the answer that satisfies all my needs (only partial), help is very welcome. What I want and have accomplished: Plain HTML5 compliant and CSS Show an image within an article Image must have a caption Caption must below the image Caption must be limited to horizantal size of image Caption may be longer than one line and text should wrap to next line (still within size of image) Image and caption must float as a group to left or right (think of using

Reusing patch objects in matplotlib without them moving position

蹲街弑〆低调 提交于 2019-12-07 06:58:09
问题 I want to automatically generate a series of plots which are clipped to patches. If I try and reuse a patch object, it moves position across the canvas. This script (based on an answer to a previous question by Yann) demonstrates what is happening. import pylab as plt import scipy as sp import matplotlib.patches as patches sp.random.seed(100) x = sp.random.random(100) y = sp.random.random(100) patch = patches.Circle((.75,.75),radius=.25,fc='none') def doplot(x,y,patch,count): fig = plt.figure

Tight bounding box around PDF of MATLAB figure

送分小仙女□ 提交于 2019-12-07 04:48:38
问题 When creating a simple figure in MATLAB and saving it as PDF, the resulting PDF file will have a luxurious bounding box. plot(1,1,'x') print(gcf, '-dpdf', 'test.pdf'); (From the ratio of the output it seems they always put in on an A page.) Is there a simple way to get a tight bounding box around the PDF? 回答1: You can format the bounding box as follows figure(1) hold on; plot(1,1,'x') ps = get(gcf, 'Position'); ratio = (ps(4)-ps(2)) / (ps(3)-ps(1)) paperWidth = 10; paperHeight = paperWidth

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

随声附和 提交于 2019-12-06 23:58:20
问题 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 "Figure(640x480)" instead of the number 1 I was expecting. How do you get the number? # Working with multiple figure windows and subplots import matplotlib.pyplot as plt import numpy as np t = np.arange(0.0, 2.0, 0.01) s1 = np.sin(2*np.pi*t) s2 = np.sin

writing “latex command” in the Matlab figure comment

跟風遠走 提交于 2019-12-06 15:21:01
I have a figure in Matlab, inside the figure i would like to write comments on the figure. the comment include latex formula; for example, I want to write this comment on my figure $$ \vec{R} = 2 $$ here is an example that I found when I searched; clear all; close all; clc; figure ms = 8; fontSize = 18; xx = 0:.1:1; plot(xx,sin(xx)) xlabel('P_{fa}', 'fontsize', fontSize); ylabel('P_{m}', 'fontsize', fontSize); I want it looks like as in the attached figure below: Note: I searched in last questions that already answered, I found that I can write latex commands in the legend, title, axis ... but

Plot really big file in python (5GB) with x axis offset

人走茶凉 提交于 2019-12-06 06:22:04
I am trying to plot a very big file (~5 GB) using python and matplotlib. I am able to load the whole file in memory (the total available in the machine is 16 GB) but when I plot it using simple imshow I get a segmentation fault. This is most probable to the ulimit which I have set to 15000 but I cannot set higher. I have come to the conclusion that I need to plot my array in batches and therefore made a simple code to do that. My main isue is that when I plot a batch of the big array the x coordinates start always from 0 and there is no way I can overlay the images to create a final big one.

Convert Matplotlib figure to NumPy array without any borders/frame or axis

北慕城南 提交于 2019-12-06 05:21:01
问题 I'm trying to compare a generated image in Python with an image/photo in a file. The best way I got to make this so far is by generating a figure in Matplotlib and then convert it to a numpy array and compare the values with the values I get from my image. I got the following code to convert a Matplotlib figure to a 3D numpy array with RGB channels: def fig2data ( fig ): """ @brief Convert a Matplotlib figure to a 3D numpy array with RGB channels and return it @param fig a matplotlib figure

Matlab add text to the outside of figure

*爱你&永不变心* 提交于 2019-12-06 03:30:28
问题 How do I add a text to the right of the figure? I want to resize the plot to leave some empty space on the right and add some information there. Thanks!! 回答1: If you want to put that text inside of a legend you can do: legend('Some quick information','location','EastOutside') That is easiest. For more control though, you can put a text box inside the figure window: MyBox = uicontrol('style','text') set(MyBox,'String','Here is a lot more information') and move it around with: set(MyBox,