fill

How can I fill an area below a 3D graph in MATLAB?

人盡茶涼 提交于 2019-12-05 10:05:57
I created the following 3d plot in MATLAB using the function plot3 : Now, I want to get a hatched area below the "2d sub-graphs" (i.e. below the blue and red curves). Unfortunately, I don't have any idea how to realize that. I would appreciate it very much if somebody had an idea. gnovice You can do this using the function fill3 and referencing this answer for the 2D case to see how you have to add points on the ends of your data vectors to "close" your filled polygons. Although creating a pattern (i.e. hatching) is difficult if not impossible, an alternative is to simply adjust the alpha

Fill missing values in data.frame using dplyr complete within groups

别说谁变了你拦得住时间么 提交于 2019-12-05 07:53:49
I'm trying to fill missing values in my dataframe, but I do not want all possible combinations of variables - I only want to fill based on a grouping of three variables: coursecode, year, and week. I've looked into complete() in tidyr library but I can't get it to work, even after looking at Using tidyr::complete with group_by and https://blog.rstudio.org/2015/09/13/tidyr-0-3-0/ I have observers that collect data on given weeks of the year at different courses. For example, data might be collected in my larger dataset for weeks 1-10, but I only care about the missing weeks that occurred in a

Centering a WPF control

主宰稳场 提交于 2019-12-05 07:13:27
I have a window where I add a new UserControl to (with an image), I simply want to center the control in the middle of the screen (both vertically and horizontally). I can only get the vertical one to work. I'm gonna swap content in the DockPanel from my CodeBehind and want to show this startup screen before I start doing my slideshow UI, this means that the content is set from the CodeBehind. My Window : <Window x:Class="GreenWebPlayerWPF.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height=

Fill the space of a div

一世执手 提交于 2019-12-05 07:03:10
I would like an element to fill the remaining space of a parent div. I have managed to do this, You can see it here "link removed" but the filling div (right) sits underneath the left div. I bascially want the right div to start where the left div finishes. Hope this make sense. <html> <head> <title></title> <style type="text/css"> #left { float:left; width:180px; background-color:#ff0000; height:20px; } #right { width: 100%; background-color:#00FF00; height:30px; } </style> </head> <body> <div> <div id="left">Nav</div> <div id="right">This is the space I need to fill but not go underneath the

How to make an SVG element transparent (using SVGweb)

爱⌒轻易说出口 提交于 2019-12-05 06:14:17
In a SVG document, I want to make a <path> -element transparent. I tried <path fill="transparent />" but this gives me a black surface in ie8 (which is the default color for unknown values). I use SVGweb to display the SVG in ie8. How do I make it appear transparent in ie8? EDIT: According to the SVG-SPEC ( http://www.w3.org/TR/SVG/painting.html#SpecifyingPaint ), the attribute fill takes a value of type <paint> . the value currentColor does work in ie8, yet it's not supported by ff and chrome. So I'd like to reshape my question: How do I make it appear transparent in ff, chrome and ie8

heatmap with values and some additional features in R [duplicate]

依然范特西╮ 提交于 2019-12-04 22:48:42
This question is an exact duplicate of: Heatmaps with values in R [duplicate] I am trying to make a heatmap in R, that along with the fill should also show the values and along with filling, should also include a row and column without applying fill on them. My data looks like this Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Sum 1999 116 127 202 229 253 271 271 245 212 174 133 115 2348 2000 114 154 193 214 263 271 254 248 210 167 120 102 2310 2001 124 134 194 202 256 270 270 243 212 176 128 108 2317 2002 107 137 199 213 267 269 267 250 211 153 123 109 2304 2003 116 141 192 220 229 265

Fill random numbers in a 2D array for column/row addition

一世执手 提交于 2019-12-04 17:09:15
Hi folks new to Java and am making slow progress. I am trying to populate a 2D array with random numbers before I add the rows and columns. So far I can create the array, display it and I'm pretty sure I have the addition bit sorted. But I'm getting an outofboundsexception when I try to fill it with random numbers. Where am I going wrong? public static void main(String[] args) { //create the grid final int row = 9; final int col = 9; int [][] grid = new int [row][col]; //fill the grid for (int i=0; i<grid.length; i++) grid[i][grid[i].length] = (int)(Math.random()*10); //display output for(int

Filling remaining vertical space

霸气de小男生 提交于 2019-12-04 16:25:27
Redesigning my website, in my CSS I have a div of height: 200px; then an image under it with a height: 532px; then lastly a div of height: 100%;. The last div is not filling the rest of the page, is there something I'm doing wrong? P.S. - All divs are in a container. All containing divs have height: 100%; I have since changed it, so I no longer require this. First, you need to set the height of html and body to 100%. Then if you want to cover the rest of the page with that div you should do something like: div{ height: -moz-calc(100% - 732px); //732 = 200 + 532 height: -webkit-calc(100% -

How to make a pattern “fixed” in Raphael.js / IE?

心已入冬 提交于 2019-12-04 15:05:44
问题 I'm creating a small tool to illustrate the benefits of polarizing lenses. Basically a user will drag the lenses (a Raphael.js path) over a dazzling scene (the CSS background of the container DIV) and "see through" the lenses. Here is the js code: var rsr = Raphael("playmask", 720,540); // Lens path var path_f = rsr.path("M0,73.293c0.024-39.605,17.289-53.697,35.302-61.34C53.315,4.312,99.052-0.012,119.011,0 c38.56,0.021,43.239,11.164,43.229,29.9c-0.002,3.45-0.76,28.632-16.349,58.949c-10.332,20

How many moves to reach a destination? Efficient flood filling

冷暖自知 提交于 2019-12-04 14:40:02
I want to compute the distance of cells from a destination cell, using number of four-way movements to reach something. So the the four cells immediately adjacent to the destination have a distance of 1, and those on the four cardinal directions of each of them have a distance of 2 and so on. There is a maximum distance that might be around 16 or 20, and there are cells that are occupied by barriers; the distance can flow around them but not through them. I want to store the output into a 2D array, and I want to be able to compute this 'distance map' for any destination on a bigger maze map