labels

MPAndroidChart - Legend labels are being cut off

主宰稳场 提交于 2019-11-30 13:42:39
问题 I am using MPAndroidChart library. Anybody has this problem? When I put the labels in BOTTOM position, these are cut. Thank you 回答1: They are cut because your text is too long and the library does not support "wrapping" of the labels to a new line. You will either have to shorten your legend labels or implement the desired functionality yourself. UPDATE: Word wrapping for the Legend is now supported. chart.getLegend().setWordWrapEnabled(true); 回答2: This seems to be a new feature since June

how to create labels for data in donut chart using d3.js

半腔热情 提交于 2019-11-30 11:50:30
I have a donut chart which updates data on click. I want to add labels to the same data. I am currently using the d3.js javascript library. Here is my code on jsfiddle What I don't understand it how to add labels to segments of the donut chart? You have to use the arc.centroid function. Take a look at the following examples: http://jsfiddle.net/nrabinowitz/GQDUS/ http://bl.ocks.org/2295263 http://jsfiddle.net/MX7JC/9/ http://blog.stephenboak.com/2011/08/07/easy-as-a-pie.html Please take a look at: http://nvd3.org/examples/pie.html or http://bl.ocks.org/Guerino1/2295263 . Check the code and you

rotate X axis labels 45 degrees on grouped bar plot R

蓝咒 提交于 2019-11-30 08:30:51
问题 How can I rotate the X axis labels 45 degrees on a grouped bar plot in R? I have tried the solution suggested here but got something very messy, the labels seem to have been added multiple times (only showing the axis part to protect data privacy): This solution (gridBase) was also unsuccessful for me, for some reason I get the following error: "Cannot pop the top-level viewport (grid and graphics output mixed?)" PS. Most people seem to recommend this solution in R base but I am stuck with

MPAndroidChart - Legend labels are being cut off

故事扮演 提交于 2019-11-30 08:15:07
I am using MPAndroidChart library . Anybody has this problem? When I put the labels in BOTTOM position, these are cut. Thank you They are cut because your text is too long and the library does not support "wrapping" of the labels to a new line. You will either have to shorten your legend labels or implement the desired functionality yourself. UPDATE: Word wrapping for the Legend is now supported. chart.getLegend().setWordWrapEnabled(true); Aksel Willgert This seems to be a new feature since June (2015): chart.getLegend().setWordWrapEnabled(true); Javadoc: /** * Should the legend word wrap? /

ggplot2: boxplot with colors and text labels mapped to combination of two categorical variables

家住魔仙堡 提交于 2019-11-30 05:08:52
问题 I would like to create a boxplot with ggplot2 from a dataset densityAGRLKA with 3 categorical variables (species, location, position) on the x-axis. The following function: ggplot(densityAGRLKA, aes(species, density, fill=location, alpha=position), dodge=species, position) + stat_boxplot(geom ='errorbar') + geom_boxplot() creates a plot, in which the grouping of the species is fine, but the colours are misleading. I have no idea how to fix this. I need a plot with the following properties:

Can I see TFS file history with labels?

非 Y 不嫁゛ 提交于 2019-11-30 02:52:24
We currently are using both Visual Source Safe and Team Foundation Server at work (VSS for old projects, TFS for current or new projects). We have always used Labels in source control for each build. In VSS if you chose to see a file history you could include labels. In TFS I cannot find an option to include the lables in the history window. Since one of the most common questions that I get asked by support or management is 'What version did we fix/add/remove/change xxxx?', I have always relied on our build labels showing up in the history. Can I get Labels to show up in a file history? Martin

Adding text to panels in lattice barchart

烂漫一生 提交于 2019-11-29 23:45:31
问题 I try to add labels to bars in a lattice barchart with multiple panels. I end up with way too many labels (every label is in every panel). Here is my code: library(lattice) data(iris) barchart(seq(1,50) ~ Petal.Width + Petal.Length | Species, data = iris, stack = TRUE, panel=function(x, y, ...) { panel.barchart(x, y, ...); ltext(x=iris$Petal.Width/2, y=y, labels=iris$Petal.Width, cex = 0.5); ltext(x=iris$Petal.Width + iris$Petal.Length/2, y=y, labels=iris$Petal.Width, cex = 0.5); } ) How

how to create labels for data in donut chart using d3.js

自古美人都是妖i 提交于 2019-11-29 17:41:27
问题 I have a donut chart which updates data on click. I want to add labels to the same data. I am currently using the d3.js javascript library. Here is my code on jsfiddle What I don't understand it how to add labels to segments of the donut chart? 回答1: You have to use the arc.centroid function. Take a look at the following examples: http://jsfiddle.net/nrabinowitz/GQDUS/ http://bl.ocks.org/2295263 http://jsfiddle.net/MX7JC/9/ http://blog.stephenboak.com/2011/08/07/easy-as-a-pie.html 回答2: Please

Can a LABEL block be used without loop?

可紊 提交于 2019-11-29 14:22:48
Can a LABEL block be used without loop? Any examples? Here is an example of using labels and break statements without a loop: block1: { if (a < 0) { break block1; } if (b < 0) { break block1; } return a + b; } public static void main(String[] args) { hello: break hello; } But why use a label on a code block? My application is usually a switch on a String variable (or anything other than char, byte, short, int, Enum). "To make an omelette, you have to break some eggs" Example: String key = "scrambled"; eggs: { if ("do-nothing".equals(key)) break eggs; if ("scrambled".equals(key)) { ;//scramble

matplotlib prune tick labels

霸气de小男生 提交于 2019-11-29 10:37:44
I am using GridSpec to plot two plots one below the other without a gap in between with gs = gridspec.GridSpec(3, 1) gs.update(hspace=0., wspace=0.) ax1 = plt.subplot(gs[0:2, 0]) ax2 = plt.subplot(gs[2, 0], sharex=ax1) which works fine. However, I want to get rid of each subplot's top and bottom tick label. For that I use nbins = len(ax1.get_yticklabels()) ax1.yaxis.set_major_locator(MaxNLocator(nbins=nbins, prune='both')) nbins = len(ax2.get_yticklabels()) ax2.yaxis.set_major_locator(MaxNLocator(nbins=nbins, prune='both')) which in many cases works fine. In some plots, however, one or more of