data-visualization

R: scatter points using longitude/latitude

谁都会走 提交于 2020-02-06 09:27:53
问题 I want to fill the colour on a map. However, the plot doesn't come out as aspected. How can I visualize the data with longitude and latitude? install.packages("WDI") install.packages("tidyverse") library(WDI) library(tidyverse) literacy_globe <- WDI(country = "all", indicator = "SE.ADT.LITR.ZS", start = 2015, end = 2018, extra = TRUE) literacy_globe <- na.omit(literacy_globe) ggplot(literacy_globe, aes(x = longitude, y = latitude, group = iso3c)) + geom_point(aes(fill = income), colour =

How to plot bar graph interactively based on value of dropdown widget in bokeh python?

↘锁芯ラ 提交于 2020-01-25 12:48:09
问题 I want to plot the bar graph based value of dropdown widget. Code import pandas as pd from bokeh.io import output_file, show from bokeh.layouts import widgetbox from bokeh.models.widgets import Dropdown from bokeh.plotting import curdoc from bokeh.charts import Bar, output_file,output_server, show #use output_notebook to visualize it in notebook df=pd.DataFrame({'item':["item1","item2","item2","item1","item1","item2"],'value':[4,8,3,5,7,2]}) menu = [("item1", "item1"), ("item2", "item2")]

web and print charts

梦想的初衷 提交于 2020-01-25 11:31:45
问题 We have a requirement to display charts in an ASP.NET MVC app but the people using the app will need to be able to print the charts to paper and also save them as an image for use in presentations. They need to be high quality for the print/present versions and it seems to me that the web based charting tools are just that - optimised for web. The co i work for have historically used fusion charts but getting the quality out of that has eluded them. If we have to build a whole separate "out

web and print charts

回眸只為那壹抹淺笑 提交于 2020-01-25 11:31:14
问题 We have a requirement to display charts in an ASP.NET MVC app but the people using the app will need to be able to print the charts to paper and also save them as an image for use in presentations. They need to be high quality for the print/present versions and it seems to me that the web based charting tools are just that - optimised for web. The co i work for have historically used fusion charts but getting the quality out of that has eluded them. If we have to build a whole separate "out

ViSEAGO tutorial: visualising topGO object

我们两清 提交于 2020-01-25 10:14:12
问题 Earlier, I had posted a question and was able to load in my data successfully and create a topGO object after some help. I'm trying to visualise GO terms that are significantly associated with the list of differentially expressed genes that I have from mouse RNA-seq data. Now, I'd want to raise a concern about ViSEAGO's tutorial. The tutorial initially specifies loading two files: 'selection.txt' and 'background.txt'. The origin of these files is not clearly stated. However, after a lot of

Is there a way to apply hue ONLY to lower part of PairGrid in seaborn

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-25 08:44:25
问题 I was wondering if it was possible to apply hue to only the lower part of a seaborn PairGrid . For example, say I have the following figure: For what I need to present I'd like to keep the density plots on the diagonal, the overall scatter plots on the upper (with printed correlation coefficients above them which I know how to do), but on the lower I want to split the points up by hue just to show my audience what happens if we do subset the data. I thought about just finding out the

Using ggplot2 facet grid to explore large dataset with continuous and categorical variables

孤人 提交于 2020-01-25 08:39:18
问题 I have a dataset with >1000 observations belonging to either group A or group B, and ~150 categorical and continuous variables. Small version below. set.seed(16) mydf <- data.frame(ID = 1:50, group = sample(c("A", "B"), 50, replace = TRUE), length = rnorm(n = 50, mean = 0, sd = 1), weight = runif(50, min=0, max=1), color = sample(c("red", "orange", "yellow", "green", "blue"), 50, replace = TRUE), size = sample(c("big", "small"), 50, replace = TRUE)) I would like to visually compare group A

How to draw a rectangle with d3.js based on 2 diametrical points and no length or height values?

丶灬走出姿态 提交于 2020-01-24 21:06:07
问题 I want to add a rectangle in my d3.js graph highlighting a specific data region. The problem is I don't want to specify a starting point and then a height and length. Rather I would like to specify two points positioned diametral – on the upper left and lower right corner of the rectangle. The highlight area rectangle needs to go from my lowest X value to the highest X value in my dataset and from a specific lower y bound to a specific higher y bound. 回答1: If you are just passing the x and y

Python/Bokeh: Disable hover tool for hidden glyphs (via interactive legend)

走远了吗. 提交于 2020-01-24 20:50:09
问题 Problem description Since bokeh 0.12.5 it is possible to use interactive legends to hide or mute glyphs via clicking on them in the legend box. This is a great feature especially for more complex plots. However, when used in conjunction with the hover tool, hidden glyphs should not trigger the hover tool because the user is provided with a tooltip for glyphs which are not visible (due to muting via the interactive legend). Here is minimal code example for clarification: import numpy as np

How to do a Nested Proportional Area Chart (circles)?

社会主义新天地 提交于 2020-01-24 20:44:06
问题 I'm looking for anything in python that I can use to do a nested proportional area chart in circles. Preferably something built with (or on top of) matplotlib. Here's an example of what such plot looks like for reference: 回答1: A nested circle diagram, where the circle area is proportional to the data could look as follows. It would take a sorted list or array of data and optionally the respective labels as input and plot a couple of circles. import numpy as np import matplotlib.pyplot as plt