figure

Python keeps overwriting hist on previous plot but doesn't save it with the desired plot

我是研究僧i 提交于 2020-04-07 10:32:37
问题 I am saving two separate figures, that each should contain 2 plots together. The problem is that the first figure is ok, but the second one, does not gets overwritten on the new plot but on the previous one, but in the saved figure, I only find one of the plots : This is the first figure , and I get the first figure correctly : import scipy.stats as s import numpy as np import os import pandas as pd import openpyxl as pyx import matplotlib matplotlib.rcParams["backend"] = "TkAgg" #matplotlib

Python keeps overwriting hist on previous plot but doesn't save it with the desired plot

江枫思渺然 提交于 2020-04-07 10:31:03
问题 I am saving two separate figures, that each should contain 2 plots together. The problem is that the first figure is ok, but the second one, does not gets overwritten on the new plot but on the previous one, but in the saved figure, I only find one of the plots : This is the first figure , and I get the first figure correctly : import scipy.stats as s import numpy as np import os import pandas as pd import openpyxl as pyx import matplotlib matplotlib.rcParams["backend"] = "TkAgg" #matplotlib

Python keeps overwriting hist on previous plot but doesn't save it with the desired plot

独自空忆成欢 提交于 2020-04-07 10:28:06
问题 I am saving two separate figures, that each should contain 2 plots together. The problem is that the first figure is ok, but the second one, does not gets overwritten on the new plot but on the previous one, but in the saved figure, I only find one of the plots : This is the first figure , and I get the first figure correctly : import scipy.stats as s import numpy as np import os import pandas as pd import openpyxl as pyx import matplotlib matplotlib.rcParams["backend"] = "TkAgg" #matplotlib

Use savefig in Python with string and iterative index in the name

流过昼夜 提交于 2020-03-18 04:51:15
问题 I need to use the "savefig" in Python to save the plot of each iteration of a while loop, and I want that the name i give to the figure contains a literal part and a numerical part. This one comes out from an array or is the number associated to the index of iteration. I make a simple example: # index.py from numpy import * from pylab import * from matplotlib import * from matplotlib.pyplot import * import os x=arange(0.12,60,0.12).reshape(100,5) y=sin(x) i=0 while i<99 figure() a=x[:,i] b=y[

Use savefig in Python with string and iterative index in the name

ε祈祈猫儿з 提交于 2020-03-18 04:48:07
问题 I need to use the "savefig" in Python to save the plot of each iteration of a while loop, and I want that the name i give to the figure contains a literal part and a numerical part. This one comes out from an array or is the number associated to the index of iteration. I make a simple example: # index.py from numpy import * from pylab import * from matplotlib import * from matplotlib.pyplot import * import os x=arange(0.12,60,0.12).reshape(100,5) y=sin(x) i=0 while i<99 figure() a=x[:,i] b=y[

What is the proper way of re-adding axes to a matplotlib figure while maintaining a constrained layout?

久未见 提交于 2020-03-05 00:23:50
问题 I have a program where I would like to swap between different axes in the same figure in order to plot different datasets against eachother, either in a polar or rectilinear coordinate system depending on the dataset. The change_axes method implements this functionality, while the swap_axes , clf_swap , hide_swap and new_subplot_swap methods show different ways of trying to swap between axes, although swap_axes is the only one that produces the desired result. The code is based on this post.

Hover tooltiptext in Rascal figure

此生再无相见时 提交于 2020-01-21 23:51:52
问题 Is it possible to produce a figure in Rascal that shows a tooltiptext during hover? I mean the little yellow thing like the one prescribed by the title attribute of a <a> tag in HTML. 回答1: yes in these slides (http://homepages.cwi.nl/~jurgenv/teaching/evolution1314/slides/intro-visualization.pdf) an example is shown: FProperty popup(str S){ return mouseOver(box(text(S), fillColor("lightyellow"), grow(1.2),resizable(false))); } box(size(50),fillColor("red"), popup("Hello")) 来源: https:/

MATLAB only prints a part of my figure

断了今生、忘了曾经 提交于 2020-01-16 02:03:41
问题 I'm trying to print my figure in MATLAB, but it keeps screwing up and I have no idea why. opslaan = figure(1); plot(1:handles.aantal,handles.nauw,'-r','LineWidth',1.5); xlabel(gca,sprintf('Framenummer (%g ms per frame)',60/handles.aantal)); ylabel(gca,'dB'); set(gca,'YGrid','on'); yAsMax = ceil( ceil(max(handles.nauw)) / 2) * 2; axis([0 handles.aantal 0 yAsMax]); pause(1); print -dpng image.png The first line is just plotting the data on my figure, then labeling x and y, turning on grid and

Plot multiple figures in background

独自空忆成欢 提交于 2020-01-16 01:01:14
问题 I have a MATLAB code that plots multiple figures at the same time. The general trick to achieve the same is to call figure(figHandle) and then make a call to plot , for e.g. figure(h1); plot(...args...); figure(h2); plot(...args...); However, I want to do this plotting without bringing figures into foreground everytime I make a call to figure(figHandle) . All I want to do is to plot multiple figures simultaneously without bringing them into visibility and export them to an excel sheet (I have

How can I strip figures and table during a pandoc LaTeX to Word conversion?

狂风中的少年 提交于 2020-01-15 19:59:48
问题 I am trying to use pandoc to convert a thesis from latex to docx. In general, this works well with the following command: pandoc input.tex -f latex -t docx -s -o output.docx --bibliography references.bib --csl=mystyle.csl However, I have an additional requirement that I am unable to fulfill. I want the output to be stripped from any figures and tables that are included in the source files. Reading the pandoc documentation and related stackoverflow question has not helped me so far. Do you