Questions tagged [fill]

fill refers to the process of assigning and rendering a color or pattern to the set of coordinates within the outline of a shape.

References

1838 questions
15
votes
3 answers

R: fill down multiple columns

I'm using fill() from the tidyr package. fill(df, colname1, colname2, colname3) works fine, until I found a dataset with 32 variables. How should I fill down all columns without typing each name? I've tried: fill(df,colnames(df)), fill(df,1:32),…
woshishui
  • 1,906
  • 2
  • 15
  • 22
14
votes
3 answers

Transparency of a filled stroke in HTML5

I'm working on a doodling app in HTML5 and I would like to do a sort of bucket feature. The idea is to draw a path and it will be closed and filled with the selected colour (colour of the stroke). It works quite well with solid colours, but if I…
Mathieu
  • 622
  • 1
  • 6
  • 12
14
votes
4 answers

ggplot2 - Shade area above line

I have some data that is constrained below a 1:1 line. I would to demonstrate this on a plot by lightly shading the area ABOVE the line, to draw the attention of the viewer to the area beneath the line. I'm using qplot to generate the graphs. …
jslefche
  • 4,379
  • 7
  • 39
  • 50
13
votes
4 answers

Plotly: How to color the fill between two lines based on a condition?

I want to add a fill colour between the black and blue line on my Plotly chart. I am aware this can be accomplished already with Plotly but I am not sure how to fill the chart with two colours based on conditions. The chart with the blue background…
Patrick Miller
  • 335
  • 1
  • 3
  • 8
13
votes
5 answers

Cordova - Adaptive icons on Android

I have a generated set of icons using Android Image Asset Studio. However, I do not know how I can set those icons to my app in Cordova. When following the documentation regarding icons in Cordova, I only managed to set the square icons to my…
EDJ
  • 843
  • 3
  • 17
  • 37
13
votes
1 answer

Angular 2 svg:circle fill attribute binding

I am trying to bind the value of the fill attribute in an element to my color: string = "#cecece" variable in my component. I have read many articles and tried different ways afterwards, however, noone was successful: style="fill:…
padr
  • 385
  • 1
  • 4
  • 16
13
votes
4 answers

How to fill PDF form in Python?

How can I fill a PDF file with forms with data and "flatten" it? I use pdftk at the moment, but it does not process national characters correctly. Is there any Python library or example how to fill PDF forms and render it to a non-editable PDF file?
Marek Wajdzik
  • 231
  • 1
  • 2
  • 4
13
votes
1 answer

How to change a path fill (on a button) with triggers in XAML

I have a button with a path as icon,i want to change the fill of the path when the mouse is over the whole button (not only the path). Thanks.
13
votes
1 answer

OpenCV closing a shape and filling it

I want to output a blue-filled hand but get the incorrect output. I've included the input picture, incorrect output picture and code below. i think the code below does not fill the whole image because the image isn't closed yet at the right…
Og Namdik
  • 823
  • 4
  • 14
  • 22
12
votes
4 answers

R: Fill empty cell with value of last non-empty cell

In Excel, it is easy to grab a cell within a column and drag the cursor downward to replace many cells below so that each cell becomes the same value as the original. This function can be performed in R using a for loop. I spent some time trying to…
adyo4552
  • 181
  • 1
  • 1
  • 8
12
votes
1 answer

python pandas dataframe : fill nans with a conditional mean

I have the following dataframe: import numpy as np import pandas as pd df = pd.DataFrame(data={'Cat' : ['A', 'A', 'A','B', 'B', 'A', 'B'], 'Vals' : [1, 2, 3, 4, 5, np.nan, np.nan]}) Cat Vals 0 A 1 1 A 2 2…
Niourf
  • 450
  • 1
  • 4
  • 15
12
votes
9 answers

C++: Fill array according to template parameter

Essentially, the situation is as follows: I have a class template (using one template parameter length of type int) and want to introduce a static array. This array should be of length length and contain the elements 1 to length. The code looks as…
phimuemue
  • 34,669
  • 9
  • 84
  • 115
11
votes
5 answers

How to fill a list

I have to make a function that takes an empty list as first argument and n as secound argument, so that: L=[] function(L,5) print L returns: [1,2,3,4,5] I was thinking: def fillList(listToFill,n): listToFill=range(1,n+1) but it is returning an…
Linus Svendsson
  • 1,417
  • 6
  • 18
  • 21
11
votes
4 answers

Docking/Filling in WPF

This seems like such a simple question, but I have been trying for an hour and can't seem to figure it out. All I want to do is fill the MainWindow with a Canvas. I couldn't find any properties to allow this, and the only way I could think of to do…
Eric
  • 2,098
  • 4
  • 30
  • 44
11
votes
1 answer

SVG water fill animation

I am to get a wipe animation to look like water is filling up inside of a drop. It currently is a square with a wave animation over top of the drop logo. It does the wave animation correctly but I can't get it to stay inside the drop and also fill…
user3029128
  • 127
  • 1
  • 1
  • 7