figure

Output positions of Matlab figures

泪湿孤枕 提交于 2020-01-04 13:08:10
问题 I want to show my graphical output of a Matlab program in a different pre-fixed window. So, that whenever I run the program, the output should be inside this figure. I followed a tutorial on the Matlab website and the created the figure as follows: Until here everything is fine. Now, when I what to show some output inside this figure with figure(1) , Imshow(A) , the figure size and position is automatically changed, which I do not want. I get something like this: Now my question is: How do I

Interaction with python's matplotlib figure: assign value to selected features

风流意气都作罢 提交于 2020-01-04 05:12:32
问题 Is it possible to select an area inside a matplotlib's figure window to which assign the value, say, 0? For example, let's say I want to write a script that, at a certain point, shows the image inside a figure window (pyplot.imshow) and asks the user to select an area to which assign the value 0? Hope that was clear enough. 回答1: This works well. Here you have a pcolormesh in which you can click and the onclick function that catches the click event will handle it and set the selected square to

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

北慕城南 提交于 2020-01-02 16:53:22
问题 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

Getting an error in W3C Markup Validation when trying to get a whole <Figure> element as a link in a page

我只是一个虾纸丫 提交于 2019-12-31 03:08:05
问题 I am trying to get whole <figure> element as a link so i wrote these line of code :- <figure> <a href="#"> <img src="images/product-image.jpg" alt="image " /> <span class="label"><span class="rotate">40%</span></span> <span class="curle-label_bg"></span> <figcaption><span class="product-brand">Brand of product</span> Main Caption here <span class="save-money">Save 395.05</span> <span class="product-price">€169.30</span> </figcaption> </a> </figure> I am getting an error "Element figcaption

Labeling different figures, font,size MATLAB

此生再无相见时 提交于 2019-12-30 10:06:37
问题 I am trying to basically copy this graph for practice for my final coming up but I don't understand how to change the font,size or labeling the axis. Simply put, I need to replicate this graph exactly from my code. I need the font to be times new roman and size 18 with a marker size of 8. How would I format my code into this? This is my code: clear clc x = linspace(0,2); y1 = sin(2*pi*x); y2 = exp(-0.5*2*pi*x).*sin(2*pi*x); figure subplot(2,1,1); hPlot1 = plot(x,y1,'rs'); ylabel('f(t)') set

save high resolution figures with parfor in matlab

可紊 提交于 2019-12-29 08:59:32
问题 I am using parfor loop to produce and save quite big number of figures. Due to the amount of data which will be presented in the figures, the resolution of the figures need to be high, something around 920 dpi. Using the normal for , the function works fine. But when we switch to parfor the resolution of the produced and saved pictures becomes totally low. This is the figure handle creation part: mainFig=figure('visible','off'); set(mainFig, 'Renderer', 'OpenGL'); and here is the saving part

How to save a figure remotely with pylab? [duplicate]

前提是你 提交于 2019-12-27 13:34:50
问题 This question already has answers here : Generating a PNG with matplotlib when DISPLAY is undefined (12 answers) Closed 3 years ago . I'm trying to generate a figure at a remote computer with the command pylab.savefig . But I got such error: Unable to access the X Display, is $DISPLAY set properly? How can I save the figure properly? 回答1: By default, matplotlib will use something like the TkAgg backend. This requires an X-server to be running. While you can just use X-forwarding, there will

Matplotlib.pyplot - Deactivate axes in figure. /Axis of figure overlap with axes of subplot

◇◆丶佛笑我妖孽 提交于 2019-12-25 18:28:40
问题 %load_ext autoreload %autoreload 2 %matplotlib inline import numpy as np import datetime as dt import pickle import pandas as pd import datetime from datetime import timedelta, date from datetime import date as dt import math import os import matplotlib.pyplot as plt plt.style.use('ggplot') from pylab import plot,show from matplotlib import ticker from matplotlib.backends.backend_pdf import PdfPages import matplotlib.dates as mdates import pylab as pl x_min_global=datetime.date(2010,1, 1)-

How to handle headers in HTML5

一个人想着一个人 提交于 2019-12-25 07:48:49
问题 I need to migrate a website for an old magazine to HTML5 and I have some semantic problems. I have created the following outline to illustrate the main layout. There's a fiddle here. <div id="wrapper"> <header> </header> <nav> </nav> <main> <p><i>Name of Magazine</i>, 1985, 4, p. 12-14</p> <article> <header> <h1>Heading</h1> <p>Subheading</p> </header> <figure> <img ...> <figcaption> Caption. </figcaption> </figure> <p>First paragraph of article text.</p> </article> </main> </div> Above the

Change Legend diagram in matlab

筅森魡賤 提交于 2019-12-25 05:58:12
问题 I have some code that basically does this: for i = 1:length(ReliabilityStruct) if (FailureFlags(i) == 0) plot(X(i), Y(i), '.b'); elseif (FailureFlags(i) == 1) plot(X(i), Y(i), 'or'); elseif (FailureFlags(i) == 2) plot(X(i), Y(i), 'og'); elseif (FailureFlags(i) == 3) plot(X(i), Y(i), 'ok'); else fprintf('\nUnknown Flag, check Data\n') return end end drawnow; legend('Recovery', '1', '2', '3'); So my aim is to make a graph that has different symbols for different flags. See below: As you can see