fill

Hatch patterns in gnuplot

回眸只為那壹抹淺笑 提交于 2019-11-29 08:50:17
I am wondering if gnuplot offers more hatched patterns than those 8 patterns which you see when typing "test" (e.g. in wxt terminal) Maybe there are more than 8 fill patterns? ...apparently not, as the code below shows... I'm not talking about patterns combined with different colors, I just mean the type of patterns. I was hoping that you can realize, for example horizontally or vertically hatched patterns. Maybe even set the distance between the hatch lines or even set the angle. Maybe you can? ### hatched pattern fill reset session set colorsequence classic N = 28 set samples N set table

Fill missing values in the data.frame with the data from the same data frame

孤者浪人 提交于 2019-11-29 08:41:45
I'm trying to backfill a fully outerjoined table with nearest preceding column data. The data frame I have looks like.. (No rows have both sides as NA and the table is sorted by date). date X Y 2012-07-05 00:01:19 0.0122 NA 2012-07-05 03:19:34 0.0121 NA 2012-07-05 03:19:56 0.0121 0.027 2012-07-05 03:20:31 0.0121 NA 2012-07-05 04:19:56 0.0121 0.028 2012-07-05 04:20:31 0.0121 NA 2012-07-05 04:20:50 0.0121 NA 2012-07-05 04:22:29 0.0121 0.027 2012-07-05 04:24:37 0.0121 NA 2012-07-05 20:48:45 0.0121 NA 2012-07-05 23:02:34 NA 0.029 2012-07-05 23:30:45 NA 0.029 with this, I'm looking to.. leave the

MATLAB fill area between lines

跟風遠走 提交于 2019-11-29 08:32:13
I'm trying to do something similar to what's outlined in this post: MATLAB, Filling in the area between two sets of data, lines in one figure but running into a roadblock. I'm trying to shade the area of a graph that represents the mean +/- standard deviation. The variable definitions are a bit complicated but it boils down to this code, and when plotted without shading, I get the screenshot below: x = linspace(0, 100, 101)'; mean = torqueRnormMean(:,1); meanPlusSTD = torqueRnormMean(:,1) + torqueRnormStd(:,1); meanMinusSTD = torqueRnormMean(:,1) - torqueRnormStd(:,1); plot(x, mean, 'k',

Android seekbar set custom style using nine-patch images

杀马特。学长 韩版系。学妹 提交于 2019-11-29 04:10:01
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 android:id="@android:id/progress" android:drawable="@drawable/search_progress_bar"></item> </layer-list> My

R: Filling missing dates in a time series?

﹥>﹥吖頭↗ 提交于 2019-11-29 02:20:21
问题 I have a zoo time series with missing days. In order to fill it and have a continuous series I do... I generate a chron date-time sequence from start to end. I merge my series with this one. I use na.locf to substitute NAs with las obsservation. I remove the syntetic chron sequence. Can I do same easier? Maybe with some index function related to the frequency? 回答1: It's slightly easier if you use a "empty" zoo object with an index. > x <- zoo(1:10,Sys.Date()-10:1)[c(1,3,5,7,10)] > empty <-

Shade region between two lines with ggplot

流过昼夜 提交于 2019-11-28 23:39:40
I produce the folowing two lines with ggplot and would like to shade a specific region between the two lines i.e. where y=x² is greater than y=2x, where 2 <= x <= 3. # create data # x<-as.data.frame(c(1,2,3,4)) colnames(x)<-"x" x$twox<-2*x$x x$x2<-x$x^2 # Set colours # blue<-rgb(0.8, 0.8, 1, alpha=0.25) clear<-rgb(1, 0, 0, alpha=0.0001) # Define region to fill # x$fill <- "no fill" x$fill[(x$x2 > x$twox) & (x$x <= 3 & x$x >= 2)] <- "fill" # Plot # ggplot(x, aes(x=x, y=twox)) + geom_line(aes(y = twox)) + geom_line(aes(y = x2)) + geom_area(aes(fill=fill)) + scale_y_continuous(expand = c(0, 0),

how to change svg fill color when used as base-64 background image data?

百般思念 提交于 2019-11-28 22:56:40
I'm using SVG for a project, loaded in css like this: background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2222px%22%20height%3D%2238px%22%20viewBox%3D%220%200%2022%2038%22%20enable-background%3D%22new%200%200%2022%2038%22%20xml%3Aspace%3D%22preserve%22%3E%3Cstyle%3E.style0%7Bfill%3A%09%23f47216%3B%7D%3C/style%3E%3Cpath%20d%3D%22M2.643%2038c-0.64%200-1.282-0.231-1.79-0.699c-1.074-0.988-1.143-2.661-0.154-3.735l13.13-14

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

家住魔仙堡 提交于 2019-11-28 21:16:35
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); stop-opacity:1"/> </linearGradient> <linearGradient id="active-gradient" x1="0%" y1="0%" x2="0%" y2=

ggplot2 - Shade area above line

让人想犯罪 __ 提交于 2019-11-28 19:56:08
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=runif(6,-2,2),y=runif(6,-2,2), var1=rep(c("A","B"),3),var2=rep(c("C","D"),3)) df_poly=data.frame(x=c(

Label minimum and maximum of scale fill gradient legend with text: ggplot2

☆樱花仙子☆ 提交于 2019-11-28 19:31:40
I have a plot created in ggplot2 that uses scale_fill_gradientn . I'd like to add text at the minimum and maximum of the scale legend. For example, at the legend minimum display "Minimum" and at the legend maximum display "Maximum". There are posts using discrete fills and adding labels with numbers instead of text (e.g. here ), but I am unsure how to use the labels feature with scale_fill_gradientn to only insert text at the min and max. At the present I am apt to getting errors: Error in scale_labels.continuous(scale, breaks) : Breaks and labels are different lengths Is this text label