fill

Fill between x and baseline x position in Matplotlib

拈花ヽ惹草 提交于 2019-11-27 23:35:27
问题 I'm looking for a way to use fill_between in matplotlib to shade between x1 and x2 as opposed to y1 and y2. I have a series of log plots, with depth on the Y axis, and the measured variable on the x axis and would like to shade to the left or right, as opposed to above or below, of the plotted line. I'm sure this should be possible with fill_between but cant make it work. As an example: import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec gs = gridspec

Difference between “-webkit-text-fill-color” and “color”?

大憨熊 提交于 2019-11-27 21:12:42
I'm trying to understand the difference between -webkit-text-fill-color and just simply color ? Is there any functional difference? So far as I can tell, they're exactly the same.. Is there something you could do with one but not the other? From the WebKit blog : text-fill-color – This property allows you to specify a fill color for text. If it is not set, then the color property will be used to do the fill. So yes, they are the same, but -webkit-text-fill-color will take precedence over color if the two have different values. I think the rationale for this is that you can choose a different

SVG “fill: url(#…)” behaving strangely in Firefox

那年仲夏 提交于 2019-11-27 20:57:07
问题 I have the following SVG graphic: <svg width='36' height='30'> <defs> <linearGradient id="normal-gradient" x1="0%" y1="0%" x2="0%" y2="100%"> <stop offset="0%" style="stop-color:rgb(81,82,84); stop-opacity:.4"/> <stop offset="100%" style="stop-color:rgb(81,82,84); stop-opacity:1"/> </linearGradient> <linearGradient id="rollover-gradient" x1="0%" y1="0%" x2="0%" y2="100%"> <stop offset="0%" style="stop-color:rgb(0,105,23); stop-opacity:.5"/> <stop offset="100%" style="stop-color:rgb(0,105,23);

Android seekbar set custom style using nine-patch images

佐手、 提交于 2019-11-27 18:09:36
问题 I am trying to create a custom-styled seekbar. I have two nine-patch images one is a gray stretching bar search_progress.9.png (background color) and the other is a green stretching bar search_progress_bar.9.png (foreground color). I use this xml as my seekbar's progressDrawable: <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background" android:drawable="@drawable/search_progress"></item> <item

How to fill 100% of remaining height?

…衆ロ難τιáo~ 提交于 2019-11-27 17:34:36
+--------------------+ | | | | | | | | | 1 | | | | | | | | | +--------------------+ | | | | | | | | | 2 | | | | | | | | | +--------------------+ Contents of (1) as shown above are unknown, as it may increase or decrease in dynamically generated pages. The second div (2) as shown above, should fill the remaining space. here is an example of my html <div id="full"> <!--contents of 1 --> <div id="someid"> <!--contents of 2 --> </div> </div> css... #full{width: 300px; background-color: red;} #someid{height: 100%;} Or is this method wrong? How should I do this? please see my demo and show me my

SVG fill color transparency / alpha?

核能气质少年 提交于 2019-11-27 16:46:06
Is it possible to set a transparency or alpha level on SVG fill colours? I've tried adding two values to the fill tag (changing it from fill="#044B94" to fill="#044B9466"), but this doesn't work. Williham Totland You use an addtional attribute; fill-opacity : This attribute takes a decimal number between 0.0 and 1.0, inclusive; where 0.0 is completely transparent. For example: <rect ... fill="#044B94" fill-opacity="0.4"/> Additionally you have the following: stroke-opacity attribute for the stroke opacity for the entire object As a not yet fully standardized solution (though in alignment with

Can't Set Fill Color Apache POI Excel Workbook

僤鯓⒐⒋嵵緔 提交于 2019-11-27 14:35:20
I have scanned this forum over and over and tried every method mentioned on here and still can't get Apache POI to change to fill background color of my excel document. Here is my code: errorOccured = true; XSSFCellStyle cs = workbook.createCellStyle(); cs.setFillBackgroundColor(IndexedColors.RED.getIndex()); row.getCell(0).setCellStyle(cs); Do you know why this wouldn't work? What is the correct way to get row.getCell(0) to be filled with red (background color)? Thank you! Sankumarsingh Use foreground color instead of Background color. errorOccured = true; XSSFCellStyle style = workbook

ggplot2 - Shade area above line

核能气质少年 提交于 2019-11-27 12:53:37
问题 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. Quickly, I have; qplot(x,y)+geom_abline(slope=1) but for the life of me, can't figure out how to easily shade the above area without plotting a separate object. Is there an easy fix for this? EDIT Ok, Joran, here is an example data set: df=data.frame(x

what's the safe way to fill multidimensional array using std::fill?

风格不统一 提交于 2019-11-27 12:13:17
Here's what I'm using: class something { char flags[26][80]; } a; std::fill(&a.flags[0][0], &a.flags[0][0]+26*80, 0); (Update: I should have made it clear earlier that I'm using this inside a class.) The simple way to initialize to 0 the array is in the definition: char flags[26][80] = {}; If you want to use std::fill , or you want to reset the array, I find this a little better: char flags[26][80]; std::fill( &flags[0][0], &flags[0][0] + sizeof(flags) /* / sizeof(flags[0][0]) */, 0 ); The fill expressed in terms of the array size will allow you to change the dimensions and keep the fill

How to draw half-filled points in R (preferably using ggplot)

好久不见. 提交于 2019-11-27 06:01:47
问题 I was wondering if it is possible to fill points with multiple colors. For example, in a scatter plot, I'd like to see for each point the upper half is filled with certain color while the lower half filled with a different one. If possible, I'd also like to make the pairs of filling colors in each point mappings from some underlying data (for instance, certain types of pairing for if the data takes value of x). So far I've thought about plotting twice with two eclipses and fill them