figure

flot on android: how to fit the screen size

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-15 11:20:07
问题 I'm trying to use flot to plot something on the webview but hard to get the figure to fit nicely according to the screen size. It seems that only absolute size is accepted, while I change it to relative, the figure disappeared: <div id="placeholder" style="width:80%;height:40%;"></div> An example you can try is here from someone else: Using Flot's Bar Graph in an Android WebView with Highlighting 回答1: problem solved. I have to use the device-width: <div id="graphHolder" STYLE="height:200px

matlab uicontrols

回眸只為那壹抹淺笑 提交于 2020-01-15 09:55:27
问题 I made a gui and I have a code (thanks Amro) that shows me a gif file. I want to show this gif file in 'hAxes' till the gui is closed (show it with the other uicontrol). I have a folder that has 200 pictures (image1.jpg, image2.jpg... image200.jpg) and I perform some things about these images (in loading1 uicontrol). I try something like: hFigure = figure('units','pixels','position',[300 300 424 470],'menubar','none',... 'name','start processing','numbertitle','off','resize','off'); hAxes =

Change subplot size in python matplotlib

岁酱吖の 提交于 2020-01-15 09:23:34
问题 I would like to change the size of the subplot when I use Python's matplotlib. I already know how to change the size of the figure , however, how does one go about changing the size of the corresponding subplots themselves? This has remained somewhat elusive in my googling. Thanks. (For example, given a figure where we have 2x4 subplots. I want to make the subplots within the figure occupy more area). 回答1: You can also play with the axis size. http://matplotlib.org/api/axes_api.html set

In matplotlib, how do you change the fontsize of a single figure?

巧了我就是萌 提交于 2020-01-15 08:31:33
问题 The code: # changes the fontsize of matplotlib, not just a single figure matplotlib.rcParams.update({'font.size': 22}) Is there a better way than setting it for a figure, and then setting it back later? 回答1: This covers every possible text object and sets the font size for each. (Note this routine has been updated from the original posting). It uses the findobj method of the Artist base class. The match keyword accepts a boolean function that performs a test on each object that is a child of

Matplotlib: Adjusting the ticks to fit within the figure

若如初见. 提交于 2020-01-14 02:23:12
问题 I have the following matplotlib code which all it does is plots 0-20 on the x-axis vs 0-100 on the y-axis import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ax.plot(range(20)) ax.set_yticks(range(100)) labels = ax.set_yticklabels(range(100)) The problem I have is that not all the labels actually fit within the y-axis. What I want to do is to divide the maximum label size into the total area of the figure to calculate how many labels I can put so that then I can group

How to center LaTeX xtable (And Figure) output in full text width

若如初见. 提交于 2020-01-07 02:24:50
问题 This is a follow-up to a question I posted earlier (How to center LaTeX xtable output in full text width). I realize that my MWE from this previous post was incomplete. In an effort to make it as minimal of an example as possible, I did leave out something that ended up conflicting. Hence, here, I am posting the issue more fully. I am using tufte-handout (http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/tufte-latex/sample-handout.pdf) to create a small report in latex. I have a file code

Bad rendering with Matlab and Painters (vector format)

旧时模样 提交于 2020-01-06 06:10:42
问题 I wonder why I have a very bad rendering when I use the Painters custom renderer in figure Export Setup? Look at this image which has used OpenGL: and this one, which has used Painters. What the hell is going on here? 回答1: There's a bug in 2014b-2015a. The easiest way to fix this is to upgrade to 2015b or newer. I had a workaround where I used matlab2tikz but that took a bit of work for my application. I don't believe there to be a workaround that can create .png files from Matlab that works

Move table position matplotlib python

断了今生、忘了曾经 提交于 2020-01-06 04:33:10
问题 I have created a figure that displays a shape and table using matplotlib . The problem is how its produced. They overlap each other. The shape is to scale so I don't want to alter it. I was wondering how I can alter the overall size of the plot or move the position of the table. import matplotlib.pyplot as plt import matplotlib as mpl fig, ax = plt.subplots(figsize = (10,6)) ax.axis('equal') plt.style.use('ggplot') ax.grid(False) xy = 0,0 circle = mpl.patches.Circle(xy, 160, lw = 3, edgecolor

Matlab: Adding symbols to figure

一笑奈何 提交于 2020-01-05 03:07:26
问题 Below is the user interface I have created to simulate LDPC coding and decoding The code sequence is decoded iteratively by passing values between the left and right nodes through the connections. The first thing it would be good to add in order to improve visualization is to add arrows to the connections in the direction of passing values. The alternative is to draw a bigger arrow at the top of the connection showing the direction. Another thing I would like to do is displaying the current

Matlab: Adding symbols to figure

落爺英雄遲暮 提交于 2020-01-05 03:07:06
问题 Below is the user interface I have created to simulate LDPC coding and decoding The code sequence is decoded iteratively by passing values between the left and right nodes through the connections. The first thing it would be good to add in order to improve visualization is to add arrows to the connections in the direction of passing values. The alternative is to draw a bigger arrow at the top of the connection showing the direction. Another thing I would like to do is displaying the current