Skip to main content

Questions tagged [bar-chart]

A bar chart is graphical representation of data where the value is represented by the length of the bar.

bar-chart
Filter by
Sorted by
Tagged with
0 votes
0 answers
37 views

How Do I Make This Graph Cleanly From Saturday to Sunday Without the Half Bars?

I am trying to create a bar graph to represent data over a week. Everything seems fine but the first and last bars (for Saturday) appear to be cut in half. My code is below. How can I fix this? nf = ...
Jack Finnegan's user avatar
2 votes
2 answers
26 views

How can I update ZData in a bar3 plot?

I'm trying to update the ZData of a bar3 plot: z = [[1, 2]; [3, 4]]; z_new = [[1, 2]; [3, 3]]; h = bar3(z);% works fine until here set(h, 'ZData', z_new); I then get following errors: Warning: Error ...
haifisch123's user avatar
0 votes
0 answers
42 views

How to style Chart.js bar chart? I have an example of Chart

I need to create some bar chart. This is a reference: https://i.sstatic.net/Zj4G3BmS.png This is what I have for now: https://i.sstatic.net/pzPxKaZf.png I marked my 3 questions on the reference with ...
Vitaliy's user avatar
0 votes
0 answers
25 views

NaN values on my bar chart x axis, removing with .notna() is creating empty space along axis

I am trying to create a bar chart representing positive and negative percentage values. I don't have any empty values in my CSV file: When I write the following code I get an output with several nan ...
Sharyn's user avatar
  • 11
0 votes
1 answer
27 views

reorder group bar plot according to the Specie column

I want to make a group bar plot with ggplot. but i want to reorder the bar according to the specie, for example first bars belong to sp1 , sp2 and then sp3 should be shown in a decsending order in ...
Ikram Bashir's user avatar
0 votes
2 answers
48 views

Nested grouping variables for stacked bar graph

I'm trying to improve the visualization of this figure by separating the x-axis into nested subcategories of samples. I'm not able to use ggplot fill for this since I've already used pivot_longer() to ...
mellifluous's user avatar
0 votes
0 answers
15 views

How to show tickmarks when using whitegrid seaborn style [duplicate]

I'm struggling to find how to show the tick marks on the x-axis when I enable the whitegrid seaborn style: import datetime import itertools import random import pandas as pd import numpy as np import ...
Pablo's user avatar
  • 983
-1 votes
1 answer
30 views

How to get geom bar percentages to reflect within-group percentages rather than the overall percentage [closed]

I have a dataset in R that looks like this: With the following code I get the graph below: ggplot(subset(f,!is.na(d)),aes(x=d,y=(..count..)/sum(..count..),fill=forcats::fct_rev(e))) + geom_bar(...
Mike Wang's user avatar
0 votes
1 answer
49 views

How to plot 2 categorical variables in a dodged barplot with their own subcategories stacked, with a line of a numerical variable on top?

I am trying to make a plot in R to show the frequency of two variables in different periods. My issue is that both variables have different subcategories. Also, I would like to add a third numerical ...
Sandra R's user avatar
0 votes
2 answers
44 views

Entry exit signals showing on next to real candle

if exit_trade == "exit_CE" strategy.exit("CE-Ex", from_entry = "CE", limit = open) plotshape(exit_trade == "exit_CE", title="Exit CE", location=...
Vicky Rawat's user avatar
1 vote
1 answer
26 views

Stacked barplot with date, group and frequency (in base R)

I have data that looks like this: Date Title Units 1 2023-11-18 L 2 2 2023-11-19 L 1 3 2023-11-23 L 1 4 2023-11-27 L 2 5 2023-11-28 L 1 6 2023-12-...
Ben's user avatar
  • 153
0 votes
1 answer
20 views

Order bars in an R plotly split bar plot by value

I have measurements from several points to several points in an R data.frame that I'd like to plot as bars using R's plotly, where each from is split by its tos, and these to's are sorted in ascending ...
dan's user avatar
  • 6,242
1 vote
1 answer
41 views

Barplot bars disappear with zooming (ggplot2)

I'm graphing a large number of bars in a barplot (>1000), and want to color a subset of them black to highlight them. However, with this large number I run into what I think is an issue with screen ...
Shawn Foley's user avatar
0 votes
1 answer
29 views

How to apply scroll bar in bar chat if i have huge data

Bar Link: https://www.chartjs.org/docs/latest/charts/bar.html i kept the below data const labels = Utils.months({count: 24}); const data = { labels: labels, datasets: [{ label: 'My First ...
Nirmala Kumar Sahu's user avatar
2 votes
1 answer
87 views

highcharts bar chart disappearing when upgrading from 10.2.1 to 10.3.1

I am currently trying to upgrade highcharts to the latest version, but ran into trouble. I have a bar chart with the following configuration: { chart: { type: 'bar', ...
Dominik Reinert's user avatar
1 vote
1 answer
49 views

How to change the color of selected item(s) in custom series

Taking the documented example for custom series rendering 'rect' elements, how can I let the color change when an item is selected? The 1st step is of course to add selectedMode: "single", ...
Yann Vo's user avatar
  • 1,875
0 votes
1 answer
53 views

Sort Seaborn Histogram by Count in a Binary Variable

I am working with pandas and seaborn to generate a fairly large barplot. The x axis consists of multiple identifying numbers, while the y axis displays counts. I am trying to order the x axis and sort ...
Alex K's user avatar
  • 113
2 votes
1 answer
36 views

How to order the stacked bar chart by total value and subset value in ggplot?

I created the bar char as below: mydata<-data.frame(id=c(1,1,2,2,3,3,4,4,5,5), total=c(24,24,24,24,22,22,22,22,22,22), category=rep(c("uncomplete",&...
Robin's user avatar
  • 437
0 votes
2 answers
37 views

Make the individual bars that share a common observation/entry appear side-by-side instead of being scattered according to axis label in R

Basically, I have a dataset with three variables im interested in plotting. One is called subgroup which has the name of subgroups that the strains belong to. At least two of them share the same ...
Sasha M's user avatar
0 votes
1 answer
32 views

How to create Funnel report in horizontal that shows exit points?

I want to create this Funnel chart that shows exit point from one path to next but doesn't seems to have one. Is there anyone that have experienced in creating similar report from echarts? enter image ...
Irvine Loo's user avatar
0 votes
0 answers
22 views

How do I make a stacked bar chart created from a Pivot table arranged from descending order (largest - smallest) in Excel?

I am creating a dashboard and have added a stacked bar chart that totals up to 100 % of the inputs in the production cycle. The stacked bar chart was created using a data in a Pivot table. The input ...
Sadredin Mahmoudi's user avatar
1 vote
1 answer
24 views

The means from stats_summary on my bar plot with a y-axis in log scale are incorrect

I am wanting to make a bar plot, with error bars representing standard deviations and an overlay of a scatter plot to show individual data points. The data is microbial count data and there are 2 ...
Emma Chareyre's user avatar
-3 votes
0 answers
21 views

Unable to give action for Custom Markerview [duplicate]

I am using bar charts in my iOS app, and I need to add an action to a custom marker view when a user taps on a specific bar in the bar chart. I have created the custom marker view and am able to ...
sai prasanth's user avatar
0 votes
3 answers
97 views

How to get the value of the clicked bar in a BarChart (JavaFx)?

I need to get the X and Y axis values of a bar in a JavaFX BarChart when it is clicked, in order to process and save this data. Using the MVC architecture, I have to separate the view containing the ...
DavideH's user avatar
0 votes
0 answers
45 views

Specify custom errorbar values in Seaborn

I have the following dataframe: data = pd.DataFrame([ ["A", "gelu", 0.896048951, 0.897377622, 0.893671329], ["A", "hard_tanh", 0.889965035, 0.891643357, ...
Liuka's user avatar
  • 299
0 votes
1 answer
40 views

How to build a chart with multiple dimensions when the same field changes over time?

Consider the following sample table: day | payment_id | status --------------------------------- Jan 1 | 1 | processing Jan 1 | 2 | processing Jan 2 | 1 | ...
Oleg Ivanytskyi's user avatar
0 votes
1 answer
56 views

Change the order of the fill between different groups ggplot2

library(ggplot2) library(dplyr) series <- data.frame( time = c(rep(1, 4),rep(2, 4), rep(3, 4), rep(4, 4)), type = c(1984:1987), value = rpois(16, 10) ) series ...
KGB91's user avatar
  • 651
2 votes
1 answer
29 views

Creating multiple pie/bar charts from pd.dataframe, finding column with max and min values

My dataframe looks like this, and i'm now looking for appropriate analysis techniques, i'm hoping some people on here could give me some advice on either creating graphs from this dataframe, or ...
Daisy's user avatar
  • 29
0 votes
1 answer
18 views

Issue with non-filling bars in a chart: why are the colors not displaying correctly?

i am facing an issue with a bar chart where the bars are not filling with the assigned colors properly. Instead, they appear as empty. I have tried various methods to set custom colors for the bars, ...
Liam Harpe's user avatar
0 votes
1 answer
22 views

Ordering the bars in a bar chart with multiple grouping variables

Here is a MWE. df <- data.frame(Y = c(1:12), Combination = c(1,1,2,2,3,3,4,4,5,5,6,6), Treatment = c("AX", "AY", "AY", "AX",...
Lin Jing's user avatar
  • 145
0 votes
0 answers
69 views

ChartJS and Vue-ChartJS: Scales in chart options do not work

I just started using ChartJS and VueChartJS and begin with a simple bar chart. The problem is that the scales in chartOptions do not affect the UI.I used ChartJS 4.4.2 and VueChartJS 5.3.1. Here's my ...
Lucia's user avatar
  • 67
0 votes
1 answer
27 views

Dynamic graph on excel

I need to plot a dynamic bar graph in Excel that contains three identical bars where I can modify the width of the bars and the distance between them. Additionally, I want to repeat the same three ...
Younes DOUAMI's user avatar
0 votes
1 answer
32 views

rearrange bars in ggplot

I want to rearrange the bars in the following graph. i want to show CT and HS bars side by side , for example first 1DAS CT and HS bar then 15DAS CT and HS bar and so on. I am using the following code ...
Ikram Bashir's user avatar
1 vote
2 answers
60 views

why does excel generate a bar graph with categories not in the order of my liking and how can i fix it?

In excel, how come the bar chart categories aren't arranged the way the tables were arranged? How can i fix this? For instance, I already arranged the rows as 1234567 and made a bar chart. However, ...
user25127494's user avatar
1 vote
2 answers
50 views

Bar plots with identical bar width *and* identical bar spacing across *several* plots

Similarly to this question, I want to generate several and separate bar plots that always have the same bar width. That said, I also want that in each of these plots, the spacing between the bars is ...
johnjohn's user avatar
  • 870
0 votes
1 answer
27 views

how to do border in box plot?

That is a random data set.seed(123) # Number of rows in the dataset num_rows <- 100 # Generate random dataset with 4 columns random_dataset <- data.frame( A = runif(num_rows), # ...
Kazi's user avatar
  • 77
-1 votes
1 answer
77 views

How to Combine a Hue-Separated Bar Plot with a Single Line on the Secondary Axis

In Python, I have a dataframe df with columns x, class, ratio and cnt. I obtained this aggregating some data before, so I know that there is a unique row for each (x, class) pair. The idea is that I ...
Julian Martin Del Fiore's user avatar
1 vote
1 answer
28 views

Proper representation of data in flipped stacked bar plot in R using ggplot2

I asked a question before but I think it was not quite clear. Here, I try to elaborate the details. We have this data frame t = c(0, 1, 2, 3, 4, 5, 6) x = c("b", "b", "w",...
user avatar
0 votes
1 answer
39 views

gganimate - Values ovelaping during transition

I want to create an animated barplot with the gganimate package. At the top of plot, I want to put the value of the coresponding year. In my dataset, year value is 1970, 1980, 1990, 2000, 2010. ...
uv_utna's user avatar
  • 63
0 votes
0 answers
27 views

Dynamic barplot

I want to create a dynamic barplot, i.e. I want to visualize the change of the y-values over time. The x-values remain the same. All I could do at the moment is creating one barplot after the other. ...
Lereu's user avatar
  • 149
0 votes
0 answers
25 views

overlay chromosome number to barplot in R

I want to add numbers above the chromosomes barplot. The chromosome data is provided as integer, for example, y1. > y1 [,1] [1,] 33 [2,] 49 [3,] 18 [4,] 61 [5,] 124 [6,] 12 [...
Limin Chen's user avatar
1 vote
1 answer
40 views

How to show info view on top of specific bar in a grouped bar chart in SwiftUI using Swift Chart framework

I am able to show info view on tap of single bar on top of that as showing below - Now I am trying to show info view on tap of specific bar in grouped bar chart as below - When I am trying to ...
Asif Raza's user avatar
  • 992
1 vote
1 answer
50 views

Plotly generated pie chart text exceed page boundary

I am using plotly to generate a pie chart, with textinfo set in outside of the sector. However, when number of sectors increase to a large amount, the textinfo will not shown in the figure frame A MWE ...
Eric Sun's user avatar
  • 851
0 votes
1 answer
76 views

Recharts - Horizontal bar chart

I have this vertical barchart working normally. const data = [ { name: "Yes", value: 35 }, { name: "Not sure", value: 21 }, { name: "No", value: 13 }, ]; <...
MiguelG's user avatar
  • 145
1 vote
0 answers
30 views

Why is the coding for legend on my barplot not working after update?

I updated Rstudio and suddenly none of my legends are working on my barplots. It's my first time asking for help on here, so hopefully I am providing the info needed to get answers? Coding is below. ...
Rebecca Connor's user avatar
0 votes
3 answers
75 views

Vertical bar chart splited by sex

I'm trying to represent my data by creating a vertical barplot separated by gender. Ideally, I would like the plot to be vertical, with the same axis for males and females almost like this example: I ...
Alicia M's user avatar
0 votes
1 answer
22 views

Matplotlib Pyplot Bar Missing Data (aliasing)

I recently had a problem with aliasing when plotting high-density data using the matplotlib pyplot bar function. Chunks of data appear missing in the plot despite actually being there. The below ...
Harvey Williams's user avatar
0 votes
0 answers
32 views

Having trouble plotting mean in ggplot barplot

I have a dataset with columns including animal id, treatment, sex, and mean speed. I attempted to make a ggplot barplot of the mean of the mean speed vs treatment split by sex (shown below). (BTW the ...
Elena Morales-Grahl's user avatar
0 votes
0 answers
27 views

Change the position plotly bar chart bars

Below is the code to re arrange a dynamic plotly-plot bar chart's bars on up and down button click, No ordering of bars required, want to interchange the bars based on up down arrow click. Chart ...
vijesh's user avatar
  • 1,163
0 votes
1 answer
45 views

my values in y axis doesn't match in ggplot

I have a dataset that looks like this: I want to plot common and unique values between two cases short only vs shortplus long case. I have used ggplot to plot a stack bar plot for better visualization....
Rhea Bedi's user avatar
  • 139

1
2 3 4 5
168