pie-chart

Scatter pie plot

坚强是说给别人听的谎言 提交于 2019-12-04 14:42:39
I'm trying to visualize a soft clustering. There are a number of points and a small number of clusters, each point belongs to each cluster with some probability. Currently, I'm overlaying a scatterplot for each cluster, with the size of 'o' markers varying by the probability. This allows easy identification of the most probable cluster, but not much beyond that. I'd like to draw a scatterplot of pie charts, i.e. one small pie chart for each of the many data points, showing these probabilities. Is that possible in Matlab? I haven't found a way to draw pies as markers or place multiple pie

Raphael JS Pie: Add ID to path slices

折月煮酒 提交于 2019-12-04 14:06:38
I've seen this question asked over at the Raphael Google Groups, but after hours of searching there, and also on here, and Google, I cannot seem to find a solution. I would simply like to be able to target my pie chart (svg path) slices using jQuery, but I cannot figure out how to add custom id's to the path tags - there is no ID attribute in there by default: <path fill="#764c29" stroke="none" d="M350,350L350.6911881148345,94.00093308961084A256,256,0,0,1,561.8463375189659,206.2741175716762Z" style="stroke-width: 1; stroke-linejoin: round;" stroke-width="1" stroke-linejoin="round"/> What would

How to insert pie charts in Pack Layout in d3.js?

我的未来我决定 提交于 2019-12-04 13:57:57
Hello All instead of simple Circles, i want to add pie charts in my Pack layout. Lets Suppose this is my pie chart data and pie layout var data=[2,3,4,5] var arc = d3.svg.arc() .outerRadius(50) .innerRadius(0); var pie = d3.layout.pie() .sort(null) .value(function(d) { return d; }); And this is how the packlayout draws the circle var circle = svg.selectAll("circle") .data(nodes1) .enter().append("circle") .attr("class", function(d) { return d.parent ? d.children ? "node" : "node node--leaf" : "node node--root"; }) .style("fill", function(d) { return d.children ? color(d.depth) : null; }) .on(

create floating pie charts with ggplot

烂漫一生 提交于 2019-12-04 13:02:36
Currently I am working on report with a floating pie chart as one of the plots. Currently I use the plotrix package to plot this pie chart. But since I use ggplot2 for all the other plots, the pie plot looks different. So I'm trying to create the plot using ggplot2. Currently I have two issues: The ggplot pie charts are plotted on a polar coordination system. I want to plot multiple pie charts on Cartesian coordination system. At the moment I do not know how to do this. I want to be able to control the pie radius on the Cartesian coordination system. Here is the code I currently use: library(

Add text inside doughnut chart from chart js-2 in react

 ̄綄美尐妖づ 提交于 2019-12-04 12:03:03
问题 i want to add a text message inside my doughnut pie chart. To be more specific i want something like this: I came across the same issue here in stack overflow by they use chart js in jquery and since i'm new to javascript i got confused. This is how i define my pie chart: <Doughnut data={sectorsData} width={250} height={250} options={{ legend: { display: false }, maintainAspectRatio: false, responsive: true, cutoutPercentage: 60 }} /> 回答1: My example uses the property text on the data to

faceted piechart with ggplot

天大地大妈咪最大 提交于 2019-12-04 11:23:12
I have the following data.frame: x = data.frame(category=c(1,1,1,1,2,2,2,2), value=c(1,2,1,1,2,2,2,1)); x$category = as.factor(x$category); x$value = as.factor(x$value); and I have created a faceted bar chart with ggplot2. ggplot(x, aes(value, fill=category)) + geom_bar() + facet_wrap(~category); However, I would like to have a pie chart that shows the fraction values (based on the totals for each category). The diagram should then show one pie chart for each category and two fractions inside each pie chart, one for each value factor. The real data has up to 6 categories and I have a few 1000

Donut chart python

拟墨画扇 提交于 2019-12-04 11:10:40
So I using this code to create a donut chart with python (inspired in this Donut plot recipe ): def make_pie(sizes, text,colors,labels): import matplotlib.pyplot as plt import numpy as np col = [[i/255. for i in c] for c in colors] fig, ax = plt.subplots() ax.axis('equal') width = 0.35 kwargs = dict(colors=col, startangle=180) outside, _ = ax.pie(sizes, radius=1, pctdistance=1-width/2,labels=labels,**kwargs) plt.setp( outside, width=width, edgecolor='white') kwargs = dict(size=20, fontweight='bold', va='center') ax.text(0, 0, text, ha='center', **kwargs) plt.show() c1 = (226,33,7) c2 = (60,121

can I make such graph in R - bar chart embedded in pie chart

心已入冬 提交于 2019-12-04 11:08:44
I have following data: I II Total A 15 25 40 B 5 45 50 C 15 5 20 R data input: group <- c("A", "B", "C", "A", "B", "C") subgroup <- c("I", "I", "I", "II", "II", "II") yvar <- c(15, 5, 15, 25, 45, 5) As I was thinking a better way to present it, I came to idea of pie chart (preferably 3D) combined with bar chart (preferably 3D). Here is my rough sketch of my idea where bar chart is embedded into pie chart. Please suggest me if you have any other innovative idea to present such data. Come on, lets go wild with the pies! I suggest you just go for pie-only solution - who needs bar charts anyway.

Animating D3 donut chart on load

二次信任 提交于 2019-12-04 08:20:21
问题 I have a donut chart with five different arcs inside of it. The data will not be updated but I want to have a transition of the whole graph being drawn as a circle when the page loads, starting at the selected angle (in my case 1.1*PI). Here is the jsfiddle of the graph: http://jsfiddle.net/Nw62g/ var data = [ {name: "one", value: 10375}, {name: "two", value: 7615}, {name: "three", value: 832}, {name: "four", value: 516}, {name: "five", value: 491} ]; var margin = {top: 20, right: 20, bottom:

How can I cause a legend to appear to the right of the pie (Chart.JS)?

五迷三道 提交于 2019-12-04 06:22:22
问题 I'm creating a fairly simple pie chart with Chart.JS like so: var data = { labels: [ "Bananas (18%)", "Lettuce, Romaine (14%)", "Melons, Watermelon (10%)", "Pineapple (10%)", "Berries (10%)", "Lettuce, Spring Mix (9%)", "Broccoli (8%)", "Melons, Honeydew (7%)", "Grapes (7%)", "Melons, Cantaloupe (7%)" ], datasets: [ { data: [2755, 2256, 1637, 1608, 1603, 1433, 1207, 1076, 1056, 1048], backgroundColor: [ "#FFE135", "#3B5323", "#fc6c85", "#ffec89", "#021c3d", "#3B5323", "#046b00", "#cef45a", "