Questions tagged [pygal]

A python SVG Charts Creator

pygal is a dynamic SVG charting library.

It features various graph types:

  • Bar charts;
  • Line charts;
  • XY charts;
  • Pie charts;
  • Radar charts;
  • Dot charts;
  • Pyramid charts;
  • Funnel charts;
  • Gauge charts;
176 questions
1
vote
1 answer

Interactive Pygal charts render in Jupyter Notebooks

I'm trying to render an interactive Pygal charts inside a Jupyter Notebook without success. I'm not looking for the image static version solution, which works nicely, but for the one with interactive tooltips. This problem has been addressed…
StefanoB
  • 11
  • 4
1
vote
2 answers

pygal plotting dates on the x-axis

(Note: I am mostly new at Python so my code is more functional than elegant, or so I hope it becomes functional.) Using Python 3.6 and pygal 2 I am attempting to read in json formated data from a storage array's REST API. I want to pull out the…
motojim
  • 13
  • 7
1
vote
1 answer

Python3 Pygal Worldmap Data not showing

Loading a json file to a list, converting to a dictionary in order to load into the pygal worldmap. When I print the dictionary the data looks ok (to me), however the map opens (from an svg file) but with no data plotted. No traceback errors are…
CGarden
  • 169
  • 17
1
vote
0 answers

Python 3 - installing pygal

I am new to Python, this might be a silly question but here goes: I'm getting an error trying to install pygall for python3: enter image description here Thanks, Mihnea
Mihnea
  • 39
  • 1
  • 7
1
vote
1 answer

Pygal plots involving datetime throw error with dates prior to 1970

Trying out the sample code for an XY plot in pygal involving datetime or date, any dates prior to 1970 cause this traceback: Traceback (most recent call last): File "C:/Users/***/dt_test.py", line 30, in datetimeline.render() File…
Patrick Dennis
  • 323
  • 1
  • 7
1
vote
1 answer

Creating pygal.Bar chart from Pandas series value counts?

I'm trying to build a pygal bar chart from a pandas DataFrame series onto which .value_counts() is applied e.g. without having to split the series into multiple columns and add those columns individually, as suggested in the documentation and this…
msoderstrom
  • 537
  • 1
  • 7
  • 14
1
vote
1 answer

I'm getting overlap with my pygal histogram

I'm trying to visualize the result of rolling two D6 on a pygal histogram viewed in browser. When mousing over one of the bars, i get number overlap. example of overlap i'll include my code below. import pygal from die import Die # Create two D6…
Cody
  • 11
  • 1
1
vote
1 answer

How to convert URI of image to image file in python

My program makes a simple chart using pygal, and outputs the chart as a URI string. I want to convert this URI into an image that I can then manipulate with pillow. I've tried decoding the string but haven't been able to make it work. The current…
Infinity
  • 17
  • 1
  • 3
1
vote
1 answer

Flask renders svg file with no interactivity

My flask app has a route that creates a .svg file (using pygal) and renders in in a template. Within the app, there are no interactive features however, if I open the the same .svg file from my file browser, I get the full interactive features I'm…
Timothy Lombard
  • 917
  • 1
  • 11
  • 31
1
vote
0 answers

pygal ValueError: Invalid PI name 'b'xml''

relative code :hist.render_to_file('1.svg') this picture show the details I have try to install new version of lxml,but can't work; The process I install it just like this: apt-get install libxml2-dev libxslt-dev python-dev pip install lxml Can…
Davenny
  • 11
  • 3
1
vote
0 answers

Cannot render_to_file in pygal more than once in Spyder

Short version When in Spyder, if I run a script more than once that saves a map with pygal's render_to_file, I get a TypeError. It works fine the first time. Detailed version I'm trying to save a map using pygal (2.4.0) in Python 3.6 as…
eric
  • 7,142
  • 12
  • 72
  • 138
1
vote
4 answers

Cannot open an html file from python in a web browser - notepad opens instead

In python I am trying to plot a graph with the pygal package import pygal # First import pygal bar_chart = pygal.Bar() bar_chart.add('Fibonacci', [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]) bar_chart.add('Padovan', [1, 1, 1, 2, 2, 3, 4, 5, 7, 9,…
Goofball
  • 735
  • 2
  • 9
  • 27
1
vote
1 answer

pygal charts line up horizontally

I am trying to get my pygal.SolidGauge charts to line up in a horizontal line like this: charts in horizontal row But I find that by default the charts are stacking up vertically like this: charts in vertical row How can I get them to line up…
bearrider
  • 172
  • 2
  • 11
1
vote
1 answer

How to save table in python?

I am trying to get a table with data saved in svg, pdf or png file. Are there any libraries to do it? I've tried pygal, but it seems that they provide only charts saving. Edited: This table is just a couple of arrays with data, and I need to build a…
dmitrius
  • 11
  • 1
  • 1
  • 5
1
vote
1 answer

Combine and compare two sets of stacked data in pygal

I'm wondering if it's possible to combine two sets of data (made up of two lists each) into a pygal chart. The code would look something like this: new_chart = pygal.StackedBar() # set…
elPastor
  • 8,435
  • 11
  • 53
  • 81