data-visualization

Manipulating x axis in panel plot when a factor is used

我们两清 提交于 2019-12-13 00:23:39
问题 The code I've used is: mcgc <- ggplot(sam, aes(x = person,y = m, colour = X)) + geom_point(size = 0.75) + scale_colour_gradient2(high="red", mid="green", limits=c(0,1), guide = "colourbar") + geom_hline(aes(yintercept = mad, linetype = "mad"), colour = "blue", size=0.75, show_guide = TRUE) + geom_hline(aes(yintercept = mmad, linetype = "mmad"), colour = "black", size=0.75, show_guide = TRUE) + facet_wrap(~ Plan, scales = "free", ncol = 4) + scale_linetype_manual(name = "Plan of Health Care",

Disable side panel when exporting Kepler.gl map?

别等时光非礼了梦想. 提交于 2019-12-12 23:13:01
问题 I loaded my data into kepler.gl (https://kepler.gl/) and created a visual I would like to post online by embedding the code into a blogpost. However, I want the readers/users not to be able to see and access the side panel, but rather only with the main view of the map. Is there any way to do so or any parameters I can change when exporting the html? 回答1: To solve the issue, one must replace the reducers block: const reducers = (function createReducers(redux, keplerGl) { return redux

Applying log scale to y-axis for visualizing proportions with ggplot2

ε祈祈猫儿з 提交于 2019-12-12 20:51:07
问题 I am attempting to recreate some plots from a research article in R and am running into an issue with applying a log scale to y axis. The visualization I'm attempting to recreate is this: reference plot with y log scale I currently have a working version without the logarithmic scale applied to the y-axis: Proportion_Mean_Plot <- ggplot(proportions, aes(days2, proportion_mean, group = observation)) + geom_point(aes(shape = observation)) + geom_line() + scale_x_continuous(breaks = seq(0,335,20

How to overlay multiple plots on the same graph in Stata?

北城余情 提交于 2019-12-12 19:17:42
问题 This question was migrated from Cross Validated because it can be answered on Stack Overflow. Migrated 7 years ago . I am using the following code for drawing a plot on a graph in Stata. I want to draw multiple plots on the same graph. Is that possible? Can anyone kindly tell me what to do? What I want to do is to have multiple plots of the following types in the same graph. Further clarification: There will be multiple means and CIs for each value of X, i.e. one mean and CI for each

How to use factorplot to annotate bars with categorical values or to plot 4 variables?

杀马特。学长 韩版系。学妹 提交于 2019-12-12 18:22:02
问题 I have a dataframe that I want to plot. I have thought of 2 options (check the images). For OPTION 1, I need to annotate a categorical value (the "Elec"). For OPTION 2, I still need to use "factorplot", but I do not know how to fix the error I get. #CODE FOR THE DATAFRAME raw_data = {'Max_Acc': [90.71, 87.98, 92.62, 78.93, 73.69, 73.66, 72.29, 92.62, 94.17, 92.62, 83.81, 79.76, 74.40, 72.38], 'Stage': ['AWA', 'Rem', 'S1', 'S2', 'SWS', 'SX', 'ALL', 'AWA', 'Rem', 'S1', 'S2', 'SWS', 'SX', 'ALL']

geoChoroplethChart map that displays cities / points of interest with tags

徘徊边缘 提交于 2019-12-12 15:22:31
问题 I've implemented an infographic / map using crossfilter and d3.js. What I would like is to add the functionality of rendering different data entries as points of interest on the map: For example here we have cities in Mexico and data to indicate a metric of tequila consumption. What I would like to make is, for instance, tequila consumption in different cities of Europe. How can I overlay such information over my map of Europe. The thing is, it's very clear how to do this with d3.js but it is

Creating a boxplot FacetGrid in Seaborn for python

和自甴很熟 提交于 2019-12-12 14:52:09
问题 I'm trying to create a 4x4 FacetGrid in seaborn for 4 boxplots, each of which is split into 3 boxplots based on the iris species in the iris dataset. Currently, my code looks like this: sns.set(style="whitegrid") iris_vis = sns.load_dataset("iris") fig, axes = plt.subplots(2, 2) ax = sns.boxplot(x="Species", y="SepalLengthCm", data=iris, orient='v', ax=axes[0]) ax = sns.boxplot(x="Species", y="SepalWidthCm", data=iris, orient='v', ax=axes[1]) ax = sns.boxplot(x="Species", y="PetalLengthCm",

How to use the same color scale for points in different maps in R?

自作多情 提交于 2019-12-12 14:34:18
问题 I have an object of the class SpatialPointsDataFrame which looks like: coordinates div score 1 (-86.2905, 32.7131) 1 0.73 2 (-113.17, 34.4462) 2 3.00 3 (-112.769, 35.1567) 4 0.94 4 (-113.193, 33.9167) 5 4.09 5 (-113.265, 34.407) 1 1.50 6 (-113.585, 34.8241) 2 5.98 7 (-113.793, 34.7597) 3 2.55 8 (-113.651, 35.1733) 2 3.21 9 (-113.675, 35.3431) 4 2.83 10 (-113.09, 34.4036) 5 6.07 11 (-114.172, 34.6878) 1 4.56 12 (-120.153, 37.3049) 3 7.00 and what I want is to produce one map for each "div"

Visualizing last refresh date in power bi

。_饼干妹妹 提交于 2019-12-12 14:28:08
问题 Is it possible to add a card in power BI that shows the last time the underneath dataset has been updated? Many thanks! 回答1: You can create a blank query and use the following M query to create a single-cell table: let Source = #table(type table[Last Refresh=datetime], {{DateTime.LocalNow()}}) in Source And then you can use the Card visual and drag in the column to show it. You can rename the field to remove the default aggregation. (It doesn't matter since there is only one row of data

Setting subgraph attributes in Rgraphviz

本小妞迷上赌 提交于 2019-12-12 14:16:24
问题 I'm trying to set a fill color in Rgraphviz for a subgraph. In the documentation, it is implied that you can set subgraph attributes where you set whether or not the subgraph is a cluster, like so: subGList = list() subGList[[1]] = list(graph=sg.iip, attrs=c(fillcolor="lightgreen", style = "filled", shape = "rectangle"), cluster = TRUE) Unfortunately, setting attributes in this manner doesn't seem to have any effect on the plot. Because my subgraphs contain 20-30 nodes (where the full graph