Is there a way to do these color-side-bars:
(source: imageupload.co.uk)
Without inserting Images?
Add a WKInterfaceButton and set its background color
otherwise Add a WKInterfaceSeparator and set its color
Add a group with two subgroups. The second subgroup contains the labels:
The second subgroup needs alignment vertical:
Change the radius of all groups to 0:
Change the size properties of the first subgroup (to realize the coloured line):
Change the colour of the first subgroup:
The result should look like this:
Related
I have the following R-code,
x1=c(3,2,4,1,2,4,4)
x2=c(4,2,4,4,1,3,1)
Y=c("red","red","red","red","blue","blue","blue")
plot(x1,x2,col=Y,pch=8)
grid(NULL,NULL,col="cornsilk2")
legend("right",c("Point","star"),col=c("red","blue"))
That creates a plot as seen below
There are two things that I wish to change however I am not sure how to go about it.
1) I want to change the types of points that appear using the pch feature in plot. So for example, I want the red points to appear as a star and the blue points to appear as a triangle. How would I go about this?
2) I want the legend to show those symbols and be coloured respectively correctly. For example, instead of having "Point" it should be a "." that is coloured blue or red depending on what colour I decide to assign it.
Many thanks for the help.
You specify a vector like your color:
SHAPE = ifelse(Y=="red",8,2)
plot(x1,x2,col=Y,pch=SHAPE)
legend("right",c("Point","star"),col=c("blue","red"),pch=c(2,8))
I have three css style classes. Each of them set the background colour of a JSF datatable row. One would make the colour of the row orange (rowHighlight), the second would colour the row white (rowWhite) and the third would colour the row grey (rowGrey).
When a certain condition is met, I want the table row to be orange. If the condition is not met, I want the colour of the rows to alternate between white and grey using the other two style sheets. The end result should have rows coloured in orange, white and grey.
I read that rowStyleClass can achieve changing the colour of a row based on a certain condition. I read that rowClasses can achieve making rows alternate colours.
I tried:
rowStyleClass="#{holidayInfo.country == ‘France’ ? 'rowHighlight' : '’ }"
rowClasses="rowWhite,rowGrey"
But this resulted in all rows being white.
I also tried:
rowStyleClass="#{holidayInfo.country == ‘France’ ? 'rowHighlight' : 'rowWhite,rowGrey'}"
But this resulted in the row being coloured in orange when the condition was met whilst all other rows were white.
Does anyone know if it is possible to combine the two? I am new to JSF.
I have managed to resolve the issue.
It looks like if you want to use rowClasses and rowStyleClass in the same datatable, the order of the attributes must be rowClasses first and rowStyleClass second.
I put rowStyleClass first and I had set the styleClass to be '' if the condition was not met. If this happened, rowClasses was ignored after setting the style class to ''.
When I put rowClasses first, it was executed and the row colour alternated between white and grey . the atttibute rowStyleClass class was not ignored because the rows where the condition was met was coloured in orange.
Thank you to everyone who helped me work this out.
I'm trying to plot a vector field and i Would like to have some help:
I would like to have a 3D GRID
i would like to know how can i draw a border of specific dimension
How can i define a palette like a gradient based on a specific component of a vector field,
i.e I have a vector field like the one in figure, I'd like the vectors to change color from red to blu depending on the magnitude of the y-component let's say .
I know it's a lot but i really need help
my 3D plot
1) Not sure what you mean by a 3D grid.
2) The border dimensions are set by xrange, yrange, and zrange. You can remove the extra space below the minimum z using
set xyplane 0
To change the size on the page, you can change the 3rd and 4th parameters of the set view command:
set view rotx, rotz, scale1, scale2
It is easiest to adjust these by click-and-drag with the middle mouse button and then either write down the scale values shown in the plot window or issue the show view command.
3) Red to blue palette mapped to y coordinate (column 2 in your plot):
set palette defined (0 "red", 1 "blue")
set style data vector
splot "resampled.odt" using 1:2:3:($4*factor):($5*factor):($6*factor):2 lc palette
I am working on a script for plotting volcano plots for a specific number of groups that the user specifies, i.e. if he wants to have five groups colored, the script modifies the data set accordingly with a new column called color. All the other observations that are there shouldn't be highlighted specifically, but be grey.
Is it possible to only specify the color of one group while letting ggplot2 choose all the colors for the other groups available?
I couldn't solve this using scale_color_manual, since it expects values for all groups!
This image demonstrates my problem, all other features except the groups, i.e. the "Features (all)" group should be grey instead of red, however I want ggplot to color all other groups automatically...
Specifying a custom color palette and sorting the color column solved my problem :)
I'm working on a report using a business object data set. The business object is really simple it has three fields (ColorName, ColorCode, Date). I'm making a bar chart using the year from the Date as the category, ColorName as the series field, and count of ColorName as the "data" (the top area in the designer) field. So the graph will show each year along the bottom with series bars of the colors. In the "Series Properties" I have the fill set to ColorCode and my color code values are HTML color codes including the pound sign. The bar graph is working perfectly. The bars are the correct colors. The legend however is inconsistent. My current graph has 5 colors and only 3 of them are showing the correct color in the legend swatch. Two of them are black but they shouldn't be. If I change the color code for a ColorName then the graph updates correctly but the swatch is still black. I have another graph that is a pie chart which is doing the same thing but the legend works correctly in that one. Anybody have an idea where I can look to resolve this legend color issue?
It looks like if any year had no series values then the legend would not work correctly. And it seems to only happen when you add a series to the report. The solution was to update my query to return counts instead of rows; including 0 counts for series that had no records. This way every series/category group had it's own record in the data set.
I have applied the same case for Rating Score 1 to 5. For each series I needed to color each bar in the Bar Chart according to the following factors (1:Poor, 2:Average, 3:Good, 4:Very Good, 5:Excellent).
Right click on any bar in the chart and select Series Properties.
Select Fill, Set background fill options - Fill Style to Solid.
Enter the below formula in the formula editor:
=IIF(Fields!Rating.Value=1, "Tomato", IIF(Fields!Rating.Value=2, "Orange", IIF(Fields!Rating.Value=3, "#cdf8cd", IIF(Fields!Rating.Value=4, "#7de67d", "Lime"))))
Hope this helps.