Questions tagged [charts]
Charts are a graphical representation of data, most often in the format of a graph or diagram. Use this tag for questions about using a charting library API.
                                	
	charts
    
                            
                        
                    
            55,513
            questions
        
        
            1590
            votes
        
        
            18
            answers
        
        
            290k
            views
        
    Cycles in family tree software
                I am the developer of some family tree software (written in C++ and Qt). I had no problems until one of my customers mailed me a bug report. The problem is that the customer has two children with ...
            
        
       
    
            464
            votes
        
        
            10
            answers
        
        
            315k
            views
        
    Generating statistics from Git repository [closed]
                I'm looking for some good tools/scripts that allow me to generate a few statistics from a git repository. I've seen this feature on some code hosting sites, and they contained information like...
...
            
        
       
    
            391
            votes
        
        
            8
            answers
        
        
            270k
            views
        
    Python Graph Library [closed]
                I'm writing a python application that will make heavy use of a graph data structure. Nothing horribly complex, but I'm thinking some sort of graph/graph-algorithms library would help me out. I've ...
            
        
       
    
            369
            votes
        
        
            5
            answers
        
        
            635k
            views
        
    Plotting two variables as lines using ggplot2 on the same graph
                A very newbish question, but say I have data like this:
test_data <-
  data.frame(
    var0 = 100 + c(0, cumsum(runif(49, -20, 20))),
    var1 = 150 + c(0, cumsum(runif(49, -10, 10))),
    date = ...
            
        
       
    
            336
            votes
        
        
            13
            answers
        
        
            183k
            views
        
    Generating a PNG with matplotlib when DISPLAY is undefined
                I am trying to use networkx with Python. When I run this program it get this error. Is there anything missing?
#!/usr/bin/env python
import networkx as nx
import matplotlib
import matplotlib.pyplot
...
            
        
       
    
            237
            votes
        
        
            18
            answers
        
        
            220k
            views
        
    Good Java graph algorithm library? [closed]
                Has anyone had good experiences with any Java libraries for Graph algorithms. I've tried JGraph and found it ok, and there are a lot of different ones in google. Are there any that people are actually ...
            
        
       
    
            223
            votes
        
        
            29
            answers
        
        
            295k
            views
        
    JavaScript Chart Library
                Would anyone recommend a particular JavaScript charting library - specifically one that doesn't use flash at all?
            
        
       
    
            216
            votes
        
        
            6
            answers
        
        
            735k
            views
        
    Set Colorbar Range
                I have the following code:
import matplotlib.pyplot as plt
cdict = {
  'red'  :  ( (0.0, 0.25, .25), (0.02, .59, .59), (1., 1., 1.)),
  'green':  ( (0.0, 0.0, 0.0), (0.02, .45, .45), (1., .97, .97)),
...
            
        
       
    
            201
            votes
        
        
            12
            answers
        
        
            299k
            views
        
    WPF chart controls [closed]
                I am looking for a very simple WPF chart which should have a 2D graph and 
should have pan and zoom facilities .
            
        
       
    
            184
            votes
        
        
            17
            answers
        
        
            470k
            views
        
    Dynamically update values of a chartjs chart
                I created an basic bar chart using chartjs and it works fine. Now I want to update the values on a time based interval. My problem is that after I created the chart, I do not know how to update its ...
            
        
       
    
            181
            votes
        
        
            10
            answers
        
        
            174k
            views
        
    Force R to stop plotting abbreviated axis labels (scientific notation) - e.g. 1e+00
                In ggplot2 how can I stop axis labels being abbreviated - e.g. 1e+00, 1e+01 along the x axis once plotted? Ideally, I want to force R to display the actual values which in this case would be 1,10.
...
            
        
       
    
            179
            votes
        
        
            12
            answers
        
        
            89k
            views
        
    How does Dijkstra's Algorithm and A-Star compare?
                I was looking at what the guys in the Mario AI Competition have been doing and some of them have built some pretty neat Mario bots utilizing the A* (A-Star) Pathing Algorithm.  
(Video of Mario A* ...
            
        
       
    
            178
            votes
        
        
            14
            answers
        
        
            135k
            views
        
    Command-line Unix ASCII-based charting / plotting tool
                Is there a good command-line UNIX charting / graphing / plotting tool out there?  I'm looking for something that will plot xy points on an ASCII graph.
Just to clarify, I'm looking for something that ...
            
        
       
    
            176
            votes
        
        
            7
            answers
        
        
            151k
            views
        
    Remove padding or margins from Google Charts
                // Load the Visualization API and the piechart package.
google.load('visualization', '1.0', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is loaded.
...
            
        
       
    
            170
            votes
        
        
            4
            answers
        
        
            204k
            views
        
    how to set start value as "0" in chartjs?
                here is my code. i need to set initial value as "0" in both x and y axis     scales. I have tried latest version scales option.
graphOptions = {               
            ///Boolean - Whether grid ...
            
        
       
    
            166
            votes
        
        
            8
            answers
        
        
            210k
            views
        
    Removing legend on charts with chart.js v2
                I'm making a homepage using, Bootstrap, JQuery and Chart.js (v2). I had my implementation working using v1, but recently just got into Bower and downloaded v2 using that.
I'm making a grid of 4 ...
            
        
       
    
            165
            votes
        
        
            11
            answers
        
        
            192k
            views
        
    What is better, adjacency lists or adjacency matrices for graph problems in C++?
                What is better, adjacency lists or adjacency matrix, for graph problems in C++?
What are the advantages and disadvantages of each?
            
        
       
    
            164
            votes
        
        
            7
            answers
        
        
            285k
            views
        
    how to draw directed graphs using networkx in python?
                I have some nodes coming from a script that I want to map on to a graph. In the below, I want to use Arrow to go from A to D and probably have the edge colored too in (red or something).
This is ...
            
        
       
    
            162
            votes
        
        
            17
            answers
        
        
            131k
            views
        
    Dependency graph of Visual Studio projects
                I'm currently migrating a big solution (~70 projects) from VS 2005 + .NET 2.0 to VS 2008 + .NET 3.5. Currently I have VS 2008 + .NET 2.0.
The problem is that I need to move projects one by one to new ...
            
        
       
    
            162
            votes
        
        
            5
            answers
        
        
            724k
            views
        
    How to plot multiple functions on the same figure
                How can I plot the following 3 functions (i.e. sin, cos and the addition), on the domain t, in the same figure?
import numpy as np
import matplotlib.pyplot as plt
t = np.linspace(0, 2*np.pi, 400)
a =...
            
        
       
    
            161
            votes
        
        
            4
            answers
        
        
            151k
            views
        
    Representing graphs (data structure) in Python
                How can one neatly represent a graph in Python? (Starting from scratch i.e. no libraries!)What data structure (e.g. dicts/tuples/dict(tuples)) will be fast but also memory efficient?One must be able ...
            
        
       
    
            158
            votes
        
        
            7
            answers
        
        
            213k
            views
        
    How to trace the path in a Breadth-First Search?
                How do you trace the path of a Breadth-First Search, such that in the following example:
If searching for key 11, return the shortest list connecting 1 to 11.
[1, 4, 7, 11]
            
        
       
    
            156
            votes
        
        
            7
            answers
        
        
            77k
            views
        
    Why use Dijkstra's Algorithm if Breadth First Search (BFS) can do the same thing faster?
                Both can be used to find the shortest path from single source. BFS runs in O(E+V), while Dijkstra's runs in O((V+E)*log(V)).
Also, I've seen Dijkstra used a lot like in routing protocols.
Thus, why ...
            
        
       
    
            150
            votes
        
        
            3
            answers
        
        
            199k
            views
        
    Move X-Axis label downwards, but not X-Axis Ticks in matplotlib
                I'm using Matplotlib to plot a histogram.
Using tips from my previous question: Matplotlib - label each bin,
I've more or less got the kinks worked out.
There's one final issue - previously - the x-...
            
        
       
    
            146
            votes
        
        
            3
            answers
        
        
            151k
            views
        
    PHP MySQL Google Chart JSON - Complete Example [closed]
                I have searched a lot to find a good example for generating a Google Chart using MySQL table data as the data source. I searched for a couple of days and realised that there are few examples available ...
            
        
       
    
            144
            votes
        
        
            23
            answers
        
        
            264k
            views
        
    Destroy chart.js bar graph to redraw other graph in same <canvas>
                I am using the Chart.js library to draw a bar graph, it is working fine, but now I want to destroy the bar graph and make a line graph in the same canvas. I have tried these two ways to clear the ...
            
        
       
    
            142
            votes
        
        
            10
            answers
        
        
            229k
            views
        
    What is the best open-source java charting library? (other than jfreechart) [closed]
                Why are there not more opensource easy to use charting libraries for Java?. The only successful opensource project in this area seems to be jfreechart, and it doesn't even have any documentation or ...
            
        
       
    
            140
            votes
        
        
            11
            answers
        
        
            219k
            views
        
    In Chart.js set chart title, name of x axis and y axis?
                Does Chart.js (documentation) have option for datasets to set name (title) of chart (e.g. Temperature in my City), name of x axis (e.g. Days) and name of y axis (e.g. Temperature). Or I should solve ...
            
        
       
    
            140
            votes
        
        
            23
            answers
        
        
            198k
            views
        
    How to clear a chart from a canvas so that hover events cannot be triggered?
                I'm using Chartjs to display a Line Chart and this works fine:
// get line chart canvas
var targetCanvas = document.getElementById('chartCanvas').getContext('2d');
// draw line chart
var chart = new ...
            
        
       
    
            140
            votes
        
        
            14
            answers
        
        
            142k
            views
        
    Python equivalent of D3.js
                Can anyone recommend a Python library that can do interactive graph visualization?
I specifically want something like d3.js but for python and ideally it would be 3D as well. 
I have looked at:
...
            
        
       
    
            136
            votes
        
        
            8
            answers
        
        
            373k
            views
        
    Rotating x axis labels in R for barplot
                I am trying to get the x axis labels to be rotated 45 degrees on a barplot with no luck. This is the code I have below:
barplot(((data1[,1] - average)/average) * 100,
        srt       = 45,
        ...
            
        
       
    
            133
            votes
        
        
            7
            answers
        
        
            40k
            views
        
    How do you represent a graph in Haskell?
                It's easy enough to represent a tree or list in haskell using algebraic data types. But how would you go about typographically representing a graph? It seems that you need to have pointers. I'm ...
            
        
       
    
            129
            votes
        
        
            18
            answers
        
        
            135k
            views
        
    Difference between Prim's and Dijkstra's algorithms?
                What  is the exact difference between Dijkstra's and Prim's algorithms? I know Prim's will give a MST but the tree generated by Dijkstra will also be a MST. Then what is the exact difference?
            
        
       
    
            129
            votes
        
        
            8
            answers
        
        
            192k
            views
        
    Understanding Time complexity calculation for Dijkstra Algorithm
                As per my understanding, I have calculated time complexity of Dijkstra Algorithm as big-O notation using adjacency list given below. It didn't come out as it was supposed to and that led me to ...
            
        
       
    
            128
            votes
        
        
            6
            answers
        
        
            145k
            views
        
    SSRS chart does not show all labels on Horizontal axis
                My SSRS report does not show all the labels on the horizontal axis. Please see below. 
Note how the red arrows point to the few that do show. So my question is, where are the rest of the labels? Each ...
            
        
       
    
            127
            votes
        
        
            15
            answers
        
        
            154k
            views
        
    Limit labels number on Chart.js line chart
                I want to display all of the points on my chart from the data I get, but I don't want to display all the labels for them, because then the chart is not very readable. I was looking for it in the docs, ...
            
        
       
    
            127
            votes
        
        
            8
            answers
        
        
            64k
            views
        
    Is there a good charting library for iPhone? [closed]
                I have a need to render and display charts (bar charts for now, but more types may be needed later) in an iPhone app I'm working on. I've done some looking around and it doesn't look like there are ...
            
        
       
    
            126
            votes
        
        
            5
            answers
        
        
            147k
            views
        
    Export a graph to .eps file with R
                How do I export a graph to an .eps format file? I typically export my graphs to a .pdf file (using the 'pdf' function), and it works quite well. However, now I have to export to .eps files.
            
        
       
    
            125
            votes
        
        
            13
            answers
        
        
            95k
            views
        
    Gantt charts with R
                How do I create a Gantt chart in R?
I'm looking for something sophisticated (looking more or less like this):
P.S. I could live without the dependency arrows.
            
        
       
    
            115
            votes
        
        
            5
            answers
        
        
            145k
            views
        
    Android charting libraries [closed]
                I am trying to find a fast and reliable charting library. After some searching, I found 4 libraries: AChartEngine [warning! official website is down and redirects to virus filled website!], ...
            
        
       
    
            114
            votes
        
        
            5
            answers
        
        
            161k
            views
        
    How do you plot bar charts in gnuplot?
                How do you plot bar charts in gnuplot with text labels?
            
        
       
    
            113
            votes
        
        
            11
            answers
        
        
            140k
            views
        
    Disable Animation with Charts.js
                I'm having some trouble turning off the animation with charts.js.
This is my code:
    
var pieData = [
    {
        value: 30,
        color:"#F38630"
    },
    {
        value : 50,
        ...
            
        
       
    
            113
            votes
        
        
            3
            answers
        
        
            156k
            views
        
    How to use two Y axes in Chart.js v2?
                I am trying to create a line chart with two datasets, each with its own Y scale / axis (one to the left, one to the right of the graph) using Chart.js.
This is my code (jsfiddle):
var canvas = ...
            
        
       
    
            111
            votes
        
        
            8
            answers
        
        
            155k
            views
        
    Breadth First Search time complexity analysis
                The time complexity to go over each adjacent edge of a vertex is, say, O(N), where N is number of adjacent edges. So, for V numbers of vertices the time complexity becomes O(V*N) = O(E), where E is ...
            
        
       
    
            110
            votes
        
        
            2
            answers
        
        
            141k
            views
        
    Charts for Android [closed]
                I am working on a project which have some charts (graphs), tick chart, candlestick chart and range chart. But the problem is, there is no library for that charts. I have got Google chart API for ...
            
        
       
    
            105
            votes
        
        
            7
            answers
        
        
            83k
            views
        
    Three ways to store a graph in memory, advantages and disadvantages
                There are three ways to store a graph in memory:
Nodes as objects and edges as pointers
A matrix containing all edge weights between numbered node x and node y
A list of edges between numbered nodes
...
            
        
       
    
            103
            votes
        
        
            1
            answer
        
        
            190k
            views
        
    Relationship between dpi and figure size
                I have created a figure using matplotlib but I have realized the plot axis and the drawn line gets zoomed out.
Reading this earlier discussion thread, it explains how to set the figure size.
fig, ax =...