Questions tagged [graph]

The term "graph" in this context pertains to visual representations of data such as charts or diagrams. For the mathematical concept, please refer to [graph-theory].

Fixing scaling problems in Recharts: A troubleshooting guide

Currently, I am working on a React application using Next.js and trying to incorporate a graph feature using recharts from . Below is the code snippet I have implemented: /index.js const formatDate = (value) => { return moment.unix(value).format('HH: ...

Converting the creation time from JSON format and replacing any special characters in the input

I'm facing a challenge in describing this. I am using the Facebook graph to showcase my pages' activity on Facebook/Twitter (via Facebook) on a website. Everything is going smoothly, except for formatting the created_time data properly. I have ve ...

When employing GraphQL Apollo refetch with React, the update will extend to various other components as well

My current setup involves using react along with Apollo. I have implemented refetch in the ProgressBar component, which updates every 3 seconds. Interestingly, another component named MemoBox also utilizes refetch to update the screen at the same int ...

Is there a method to merge elements from two separate "lists of lists" that contain the same elements but have different lengths within each list?

In an attempt to merge two distinct lists of lists based on shared elements, I find myself faced with a challenge. Consider the following: list1 = [['a1', 'a2', 'b2'], ['h1', 'h2'], ['c1', ' ...

The functionality of ClickMarker is malfunctioning in the XY Amcharts

Recently, I encountered a situation where I had to incorporate custom legends in XY Amcharts. After managing to implement them successfully, I came across an issue. Despite adding event listeners to the legends, the associated function failed to trigger. ...

Do networkx edges support bidirectional connections?

Are edges created by the networkx Python package bidirectional? For example: graph.add_edge(0,1) This means there is a path from node 0 to 1, but does it also imply a path from 1 to 0? ...

Discovering the route from Point A to Point B by incorporating n loops

Looking for guidance on a problem I'm facing. My array contains information about edges between different nodes. For example, a[1][39] = 'p' --> Transition 'p' from node 1 to node 39. The graph is as follows: i[1][51] = 'p ...

Enumerating groups of three vertices in a graph with multiple edges

Consider the following graph: import igraph as ig g=ig.Graph.Erdos_Renyi(10, 0.5, directed=True) To obtain its triad census, you can use the triad_census function: tc = g.triad_census() The output of 'tc' might look like this: 003 : -2147483648 | 012 ...

Ordering data in GraphQL by its unique identifier

After downloading a simple tutorial code, I found myself struggling to figure out how to sort by ID in GraphQL while playing around with it. Here is the query.js file: import React from "react"; import { useQuery } from "@apollo/react-hooks"; const Quer ...

Error in NVD3 causing charts to be inaccurately rendered

While utilizing a stacked area chart in the Stacked display mode, there appears to be an issue with the shading under the graph, particularly on the left side of the displayed plot below. We are currently working with d3 v3.4.9 and nvd3 v1.1.15b. Do you ...

Exploration of an extensive dataset halted by reaching the maximum recursion limit

I am currently facing an issue while implementing DFS search in Python. To manage the nodes, I am utilizing the networkx library to represent them in a graph data structure. The dataset consists of 5 million nodes. Following the conversion of the stored da ...

Creating graphs in Python on a Linux system can be done without the need for an

As a newcomer to the world of Python, I am diving into the realm of graphs. Can someone provide guidance on whether it's possible to plot graphs using matplotlib in the console on a Linux system without an active XSERVER? Thank you. ...

the x-axis of the graph object is failing to update

Here is a snippet of the code I'm working with: from plotly.subplots import make_subplots import plotly.graph_objects as go surf=make_subplots( rows=1, cols=2, subplot_titles=( 'Surface growing for {} seconds'.format(sto ...

guide on creating a simple line highchart using JSON data

Here is the JSON data I have: {"09/02/2014 15:36:25":[33.82,33.42,40.83],"08/11/2014 16:25:15":[36.6,33.42,40.45],"07/30/2014 08:43:57":[0.0,0.0,0.0],"08/12/2014 22:00:52":[77.99,74.1,80.12],"08/12/2014 21:19:48":[56.91,63.23,52.42],"07/23/2014 13:37:46": ...

What is the process for creating a timeline within a single bar graph?

I'm having an issue plotting a timeline chart where the tasks are stacking on top of each other. import pandas as pd import plotly.express as pex d1 = dict(Start= '2021-10-10 02:00:00', Finish = '2021-10-10 09:00:00', Task = &apos ...

generate a graph for the top 20 most common words in the

Currently, I am attempting to display the most frequently used words in a plot, however, I am encountering an issue due to the language being Arabic which does not align with the format. fig, ax = plt.subplots(figsize=(12, 10)) sns.barplot(x="word", y="fr ...

Are there any similar tools to Graphstream in Java that can be used with HTML5 using canvas and JavaScript?

GraphStream is a revolutionary graph library created in Java that offers Java developers a simple way to visually represent dynamic graphs either in memory, on screen, or in files. Check out this demo video. With GraphStream, you can effectively handle th ...

Axis Labels for x and y in Flot Chart

Have you ever wondered if it's possible to display titles for the x and y axes on a Flot graph? Take a look at the following code snippet: $.plot($("#placeholder_1w"), [d], { series: { lines: { show: true, fill: false, fillColor: "red" } ...

Algorithm for identifying articulation points - detecting back edges

Currently, I am studying Tarjan's algorithm to identify articulation points in a graph through DFS. https://www.geeksforgeeks.org/articulation-points-or-cut-vertices-in-a-graph/ In this context, some important notations are: low[] : Array of N elem ...

I am looking to visualize the training accuracy and loss during epochs in a TensorFlow v1.x program. How can I plot these metrics within the program

As a beginner in tensorflow programming, I am looking to visualize the training accuracy, training loss, validation accuracy, and validation loss in my program. Currently, I am working with tensorflow version 1.x on google colab. Here's a snippet of the ...

Is it possible to create Excel documents containing statistical graphs and pie charts by utilizing PHP and SQL?

I have a database filled with statistical data that I want to export into an excel file. Can anyone recommend any popular libraries or scripts for generating excel files? Additionally, I am interested in displaying some of the dry numerical data in p ...

Is the combination of three levels in a graph a complex concept?

For several weeks now, I've been grappling with this problem and haven't quite figured it out yet. Let's imagine you have a few elements where each digit represents an index 0 0 0 0 0 0 1 0 1 ...

What is the best way to utilize Python to solve and visualize a particular mathematical equation?

Hello, I am new to Python and have two questions that I hope you can help me solve. 1) How would I go about plotting all the points (x, y) that satisfy the following equation? y==11+(1+2x)((11x)/(5+10x))^((3y)/(3y-(5+x))) Given x>0 and y>0. 2) Now, let ...

Setting up NEO4J graph database on your current Amazon EC2 instance

Currently, I have an adjacency list prepared for constructing a graph with 50,000 nodes and 100 million edges. My plan is to store this data in a graph database, specifically NEO4J. I am looking for guidance on how to download and install NEO4J for free ...

The functionality of hatches in Matplotlib cycler is not functioning properly

Consider the sample code snippet below: %matplotlib notebook import matplotlib.pyplot as plt from cycler import cycler bar_cycler = (cycler(color=["#E69F00", "#56B4E9"]) + cycler(hatch=["/" , "o"])) p ...

Visualizing data with Matplotlib: Histogram displaying frequency in thousands

I am currently working on a histogram in matplotlib that contains around 260,000 data points. The issue I am facing is that the y-axis on the histogram displays high numbers like 100,000. What I would prefer is to have the y labels represent thousands ins ...

Unlocking the secrets of integrating extra information into tooltips with chart.js

I have a graph displaying x-axis and y-axis data from a database table. However, I encountered an issue when trying to append a third set of data in the afterbody callback function within the tooltip. It displays the entire dataset in every tooltip. My go ...

creating a chart with fixed data using Google Charts

I'm looking to create a graph for my static data using the Google Chart tool. Below is the code snippet that I have: <html> <head> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <scrip ...

Issue with Rickshaw graph not updating in real-time

Here is my code for generating a graph: var allVenues = []; var seriesData = []; var callGraph = function () { var where = jQuery('#hdnVal').val(); jQuery.ajax({ url: "PopulateTable", type: 'GET', ...

Executing NextJS Request on Each Route Transition

I am working on a project with NEXTJS 13 and a Pages directory. I am looking to make a request to our graphql server every time a route changes. Is it possible to do this from the server-side? Additionally, can I store this data in my Redux store after m ...

Cyrillic characters cannot be shown on vertices within Reagraph

I am currently developing a React application that involves displaying data on a graph. However, I have encountered an issue where Russian characters are not being displayed correctly on the nodes. I attempted to solve this by linking fonts using labelFont ...

Hide series in JQPlot by simply clicking on its legend name, while ensuring that the tooltip is always visible

Currently, I am utilizing JQPlot along with the legend plugin to allow for toggling the display of series by clicking on their legend names. legend: { show: true, placement: 'outsideGrid', renderer: $.jqplot.EnhancedLegendRende ...

Storing an image in a file using PHP

After generating a graph using PHP and saving it as a PNG file with the given code, I have a query. How can I save the image for download instead of displaying it on a web page? Your assistance in guiding me through this process would be greatly apprecia ...

Uniform color scheme throughout Matplotlib Groupby visualization

My goal is to create a unique visual representation called a scatter pie plot, which groups data by two specific columns: Column1 and Column 2. The color displayed in each section of the pie chart is determined by the values found in Column 3. You can see ...

Fetching a substantial amount of data via AJAX to generate a graph

Currently, I am in the process of developing a server that will supply data and information to both a web client and a mobile client in the second phase. One of the key features is displaying this data on a graph, such as showing the price of a stock over ...

Having difficulty passing an object in a GraphQL mutation

I've been trying to figure out how to pass an array of objects in a GraphQL mutation from the React JS side. I attempted passing the object in React but encountered an error stating that it's not the same type. [input type][1] [from api side][2] [declar ...

Visualizing CSV data with charts and tables

Can you provide guidance on effectively presenting a large volume of CSV data? We aim to showcase multiple counts, averages, and other statistics. Are there any specific tools or techniques that can assist with this task? ...

Changing the size of shapes in cytoscape.js when using the dagre layout

My goal is to resize the shapes of the nodes based on the size of the node text. I tried following the steps outlined in https://github.com/cytoscape/cytoscape.js/issues/649, but encountered some issues: The shapes consistently end up with equal height a ...

The misleading A*(A-star) algorithm inaccurately produces faulty routes and ultimately collapses

I am currently working on implementing the A*(A-star) algorithm in react.js, but I am facing a problem. Whenever the startNode (green) or destinationNode (blue) have more than one neighbour or if there is a cycle in the graph, my program crashes. There see ...

The impact of random attacks on an exponential complex network

I have been attempting to replicate a random attack on an Erdos-Renyi network. The expected outcome is for the network to collapse after removing approximately 20 to 30% of the nodes. However, my results differ as the size of the giant connected component ...

How do I determine the data type present in the response from the graph API?

As a beginner in graph API, I find myself needing to use multiple graph APIs simultaneously within my application. One question that arises is how can I determine the data type of the response? Specifically, how do I identify if the response contains frie ...

LightWeightChart: How do I incorporate a chart that resembles this style?

Is it possible to create a chart using lightweight-chart that includes two graphs sharing the same x-axis but with different values on the y-axis? Essentially, I want to have two panes in a single chart. Does anyone have suggestions or tips on how this c ...

Is it possible to convert an adjacency list into JSON format?

Presented is an example of an adjacency list: A - A1 A - A2 A - A3 A3 - A31 A31 - A311 A31 - A312 The desired output format is as follows: { "name": "A", "children": [{ "name": "A1" }, { "name": "A2" }, { ...

Unable to modify the bar's color using the .css document

Below is the JavaScript code being used: var marginEducation = {top: 20, right: 30, bottom: 40, left: 300}, widthEducation = 1000, heightEducation = 460; const svgEducation = d3.select("#Education") .append("svg") .attr("w ...

"Exploring the world of JSON with Android and Java

Just delving into the world of JSON and experimenting with the FLOT graph for displaying graphs via WebView. Struggling with JSON parsing to represent my data as JavaScript expects. Despite hours of tinkering, I can't seem to format my JSON output to ...