figures

How to make a hyperlink navigate to the top of the figure in LaTeX when using hyperref?

孤者浪人 提交于 2019-12-02 16:41:30
I have a LaTeX document with a figure and references to it: \begin{figure} ... \caption{...} \label{fig:1} \end{figure} \ref{fig:1} I use the hyperref package to get hyperlinks in the resulting PDF. However the link to the figure navigates to the caption leaving the figure itself out of the view. How can I make it navigate to the start of the figure instead without moving the caption to the top? Add this in your preamble \usepackage{hyperref} \usepackage[all]{hypcap} %for going to the top of an image when a figure reference is clicked Make sure that the \usepackage[all]{hypcap} is written

How do I fill in the area between two lines and a curve that's not straight in MATLAB (the region is not a polygon)

十年热恋 提交于 2019-12-02 07:00:28
问题 Using matlab's FILL function creates a filled region confined by a polygon with straight edges: Unfortunately this leaves a small white region in the figure above, because the boundary of the region I want filled in is not a straight-edged polygon, but rather has a curved boundary on the left side. I have a curve (nearly parabolic but not exactly), and I want to fill in the region between two horizontal lines AND the curve itself. I also looked into the MATLAB function IMFILL, but with no

How do I fill in the area between two lines and a curve that's not straight in MATLAB (the region is not a polygon)

人走茶凉 提交于 2019-12-02 05:08:39
Using matlab's FILL function creates a filled region confined by a polygon with straight edges: Unfortunately this leaves a small white region in the figure above, because the boundary of the region I want filled in is not a straight-edged polygon, but rather has a curved boundary on the left side. I have a curve (nearly parabolic but not exactly), and I want to fill in the region between two horizontal lines AND the curve itself. I also looked into the MATLAB function IMFILL, but with no luck. What you need to do is make a polygon with more corners, so that it fits the curve more smoothly: %#

How to draw good looking arrows in Matlab?

十年热恋 提交于 2019-11-30 20:27:57
I have been trying to draw arrows in Matlab in my figure but they all look terrible. Also, I want my arrowhead to be a solid triangle, not a V. I tried using the packages available on the Matlab File Exchange: arrow, arrows, arrows3, and probably at least one other one. I even tried manually creating an arrow in the Matlab figure editor, but when I adjust the line width, the arrow looks like this: I used the annotation command to create the arrow above: annotation(gcf,'arrow',[0.621875 0.457916666666667],... [0.205421152030217 0.40755429650614],... 'HeadLength',4,'LineWidth',5); Here's the

Python with matplotlib - drawing multiple figures in parallel

我与影子孤独终老i 提交于 2019-11-30 04:23:19
I have functions that contribute to small parts of a figure generation. I'm trying to use these functions to generate multiple figures? So something like this: work with Figure 1 do something else work with Figure 2 do something else work with Figure 1 do something else work with Figure 2 If anyone could help, that'd be great! There are several ways to do this, and the simplest is to use the figure numbers. The code below makes two figures, #0 and #1, each with two lines. #0 has the points 1,2,3,4,5,6, and #2 has the points 10,20,30,40,50,60. from pylab import * figure(0) plot([1,2,3]) figure

MATLAB - best way to dynamically update a line handles' XData and YData?

两盒软妹~` 提交于 2019-11-29 07:13:06
I am collecting data and plotting that data in real time. The data are produced by a motion capture system. I have one class DynamicDataset that is just a wrapper around a 2-column matrix (although it's more nuanced than that) with an event notifier for new data added; another class DynamicPlotter that listens for the data-added event and updates the plot dynamically. Appropriate code snippets: classdef DynamicDataset < handle properties newestData = []; data = [] end events DataAdded end methods function append(obj, val) obj.data(end+1,:) = val; obj.newestData = val; notify(obj, 'DataAdded');

Python with matplotlib - drawing multiple figures in parallel

耗尽温柔 提交于 2019-11-29 01:39:19
问题 I have functions that contribute to small parts of a figure generation. I'm trying to use these functions to generate multiple figures? So something like this: work with Figure 1 do something else work with Figure 2 do something else work with Figure 1 do something else work with Figure 2 If anyone could help, that'd be great! 回答1: There are several ways to do this, and the simplest is to use the figure numbers. The code below makes two figures, #0 and #1, each with two lines. #0 has the

Rendering and image quality in MATLAB figures

匆匆过客 提交于 2019-11-28 07:03:53
I have a contour plot and I am using the current rendering: set(gcf, 'renderer', 'zbuffer'); but it is giving me this thick red line in the plot and I don't know how to get rid of it. I tried switching to: set(gcf, 'renderer', 'opengl'); but the quality is poor and I really need to have high quality images. Any suggestions? In general, I let MATLAB choose which renderer is most appropriate, which means leaving the RendererMode property of the figure set to its default value of auto . A brief description of the current 'Renderer' options can be found here . I'll address your two problems

prevent plot from showing in jupyter notebook

烂漫一生 提交于 2019-11-28 06:10:22
How can I prevent a specific plot to be shown in Jupyter notebook? I have several plots in a notebook but I want a subset of them to be saved to a file and not shown on the notebook as this slows considerably. A minimal working example for a Jupyter notebook is: %matplotlib inline from numpy.random import randn from matplotlib.pyplot import plot, figure a=randn(3) b=randn(3) for i in range(10): fig=figure() plot(b) fname='s%03d.png'%i fig.savefig(fname) if(i%5==0): figure() plot(a) As you can see I have two types of plots, a and b. I want a's to be plotted and shown and I don't want the b

How do I get the handles of all open figures in MATLAB

こ雲淡風輕ζ 提交于 2019-11-27 06:31:53
I have nine open figures in matlab (generated by another function) and I want to print them all to file. Does anyone know how to grab the handles of all open figures in MATLAB? I know about gcf but it doesn't seem to do what I want. There are a few ways to do this. One way to do this is to get all the children of the root object (represented in prior versions by the handle 0 ): figHandles = get(groot, 'Children'); % Since version R2014b figHandles = get(0, 'Children'); % Earlier versions Or you could use the function findobj : figHandles = findobj('Type', 'figure'); If any of the figures have