Regarding bar graphs for large data

1 visualizzazione (ultimi 30 giorni)
Bala Valli Sri Harika Kuppa
Risposto: BhaTTa il 15 Set 2024
Hey everyone,
I have an issue with the bar graphs x axis data. I have a large amount of data say for about 1000 iterations and more. It is the load data for every hour of the day along with the number of iterations the load value is being repeated in those 1000 iterations. i.e. the probability of occurrence of the load. But when I create a 2d graph for every hour with load on x axis and occurrence on y axis, the data on y-axis comes exactly, but my load data starts from 1 and ends abruptly without reaching the end value. But the graph shape is correct, I feel the data on the x axis is being given incorrectly according to my research on them for many number of times.I know about the set function but I cannot keep setting the x axis for many iterations as in my case. Did anyone else face this. Can someone guide me through this ?
Thank you

Risposte (1)

BhaTTa
BhaTTa il 15 Set 2024
It sounds like you're dealing with a large dataset where you want to plot the probability of load occurrences for each hour of the day over many iterations. The issue seems to be with the x-axis labels not displaying correctly, possibly due to the large number of unique load values.
Here’s a structured approach to address this issue:
  1. Ensure Data Alignment: Make sure your x-axis data (load) and y-axis data (occurrence) are correctly aligned and of the same length.
  2. Use Histogram or Bar Plot: Consider using a histogram if the load values are continuous or a bar plot if they are discrete. This will help visualize the distribution more clearly.
  3. Adjust X-Ticks: If the x-axis labels are too dense, you can adjust the number of ticks or rotate them for better readability.
  4. Plot in Segments: If the data is too large, consider plotting it in segments or using subplots to handle each hour separately.

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by