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
5
votes
6 answers

How to expand a list with NULLs up to some length?

Given a list whose length <= N, what is the best / most efficient way to fill it up with trailing NULLs up to length (so that it has length N). This is something which is a one-liner in any decent language, but I don't have a clue how to do it…
eold
  • 5,972
  • 11
  • 56
  • 75
5
votes
1 answer

default stroke and fill in SVG

Im confused about stroke and fill defaults in SVG. in the SVG spec (http://www.w3.org/TR/SVG/painting.html#StrokeProperty) it says the initial value for the stroke property is none - which i am guessing is transparent? and the default stroke width…
siliconeagle
  • 7,379
  • 3
  • 29
  • 41
5
votes
1 answer

Filling memory with random bytes - C/Objective-C

I'm using CommonCrypto for encryption in Objective-C (AES256) and I'd like to provide an IV (initialization vector) for a more secure encryption. I'm currently doing this: const void* iv = malloc(kCCBlockSizeAES128); // EDIT: //if (!iv) { // iv =…
Alex
  • 5,009
  • 3
  • 39
  • 73
5
votes
1 answer

(radial) gradient fill using OpenGL ES

I am currently drawing a shape using the following code; GLfloat vertex = // vertex points glLineWidth(2); glEnableClientState(GL_VERTEX_ARRAY); glColor4f(1.0, 0.0, 0.0, 1.0); glVertexPointer(2, GL_FLOAT, 0, vertex); glDrawArrays(GL_LINE_STRIP, 0,…
Thizzer
  • 16,153
  • 28
  • 98
  • 139
5
votes
4 answers

Forward fill column on condition

My dataframe looks like this; df = pd.DataFrame({'Col1':[0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0] ,'Col2':[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}) If col1 contains the value 1 in column 2 I want to forward fill with 1 n…
redbaron1981
  • 407
  • 3
  • 9
5
votes
1 answer

Filling NaN using the mean values from the same hour of previous days

I want to fill NaN using a mean of values from the same hour-minutes of the previous days. To simplify, this is an example of my df. timstamp data 22/04/2016 09:00 1 22/04/2016 09:05 2 ... 23/04/2016 09:00 3 23/04/2016 09:05…
k.ko3n
  • 954
  • 8
  • 26
5
votes
3 answers

How to Fill Color Outside of a Shape (an Oval)

I want to be able to draw on a BufferedImage, using a Graphics2D instance, and fill Color outside of a Shape. If this was a shape such as a Rectangle it would be easy, but the Shape I need to work with is a Circle. It's easy to fill a circle with…
Anju Maaka
  • 263
  • 1
  • 10
5
votes
3 answers

using std::fill on a 2D int vector

I am trying to set the values of all elements in 2D vector to a particular value. As far as I am aware of, one cannot use memset for vectors like how they are used for arrays. Hence I have to use std::fill to set all elements in 2D vector to a…
Mc Missile
  • 715
  • 11
  • 25
5
votes
1 answer

Resample rows for missing dates and forward fill values in all columns except one

I currently have the following sample dataframe: No FlNo DATE Loc Type 20 1826 6/1/2017 AAA O 20 1112 6/4/2017 BBB O 20 1234 6/6/2017 CCC O 20 43 6/7/2017 DDD O 20 1840 6/8/2017 EEE …
PineNuts0
  • 4,740
  • 21
  • 67
  • 112
5
votes
2 answers

Replace nulls with the last non-null value using Redshift

I have a table called quantities: +----------+----------+ | date | quantity | +----------+----------+ | 30/11/17 | 90 | +----------+----------+ | 01/12/17 | | +----------+----------+ | 02/12/17 | …
Henry
  • 697
  • 1
  • 6
  • 16
5
votes
1 answer

SVG RECT Width and Height of 100%

I am creating an SVG element, and would like to change its background color. As per this question, and as per W3C recommendations, background-color is not a standard style for SVG, but fill must be used instead. However, fill does not work and the…
Greeso
  • 7,544
  • 9
  • 51
  • 77
5
votes
2 answers

How to fill legend background color when plotting with TWO axes?

The issue I have a plot with 2 y-axes, each corresponding to a set of lines. The solid lines correspond to the left y-axis, and the dashed lines correspond to the right y-axis. I also have a legend and I want it to use only the solid lines as the…
Cebbie
  • 1,741
  • 6
  • 23
  • 37
5
votes
2 answers

Python: foward fill nans and zeros

Suppose I have a dataframe, df1, that has zeros and nans: dates = pd.date_range('20170101',periods=20) df1 = pd.DataFrame(np.random.randint(10,size=(20,3)),index=dates,columns=['foo','bar','see']) df1.iloc[3:12,0] = np.nan df1.iloc[6:17,1] =…
trob
  • 387
  • 1
  • 5
  • 15
5
votes
3 answers

R: using hatched fill in plots

I was using R to make some plots for a report. I see that the plots don't seem to be so smooth. I am new to R so don't know much. But how do I get smooth plots? Also by default the plots are filled with solid colors but I want to have hatched fills…
sfactor
  • 12,592
  • 32
  • 102
  • 152
5
votes
1 answer

MATLAB Fill area between two contour plots

I have two contour plots and I want to be able to fill from one contour in one image to the same height contour in the other. In the plot you can see two lines of each color - these are the lines I want to fill between, with the same color as the…
user1153070
  • 139
  • 8