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

pygal: How to show the data labels in the saved png

If I include label as in the code snippet below, it shows the data labels when rendered as svg and mouse-hover. However, how do I make the labels show up in a saved png? import pygal chart = pygal.XY() chart.add('line A', [{'value': (10, 2),…
tikka
  • 493
  • 1
  • 4
  • 17
1
vote
0 answers

How to wrap y axis labels with pygal

I am trying to wrap long y axis labels on my plot with pygal. My current method which worked with matplotlib: labels = ['\n'.join(wrap(l, 20)) for l in labels] The newline characters seem to be rendered as whitespaces.. How can I fix this?
TopTofu
  • 33
  • 1
  • 4
1
vote
1 answer

how to get the line graph for the multiple csv files using python?

enter image description hereLets say I have multiple csv files for test_suites UPT_Synergy_graph22.csv, UPT_C7000_graph22.csv, SAT-Synergy-gen2_graph22.csv, like this i have 10 more csv files, which are having the same columns in all the files…
1
vote
0 answers

pygal rendering series as hidden

when I generate a chart into svg in pygal, it allows to click in legend and hide a series. How can I generate graph with series hidden and user only choosing which ones to see? Ideally if there I can choose each series to be hidden or shown upon…
Draq
  • 49
  • 1
  • 7
1
vote
1 answer

Rolling dice with pygal

Why is there a +1 in the code below? from die import Die #from the file die.py import the Class Die # create a D6. die = Die() # make some rolls, and store results in a list. results = [] for roll_num in range(100): result = die.roll()# file…
Lucas Batista
  • 143
  • 1
  • 5
1
vote
0 answers

pygal + Bar Chart + Changing the color of values within the same series depending on the x_label

Hello People. I would like to use pygal to plot an image as shown in the one above: Plotting the same series with different colors based on the x_label. What I would like to show, basically, is the difference between weekdays and weekends. However,…
Nadros
  • 311
  • 2
  • 6
1
vote
2 answers

How to plot data on a world map in a Jupyter / iPython Notebook using pygal library?

I would like to visualize / display data on a world map in a Jupyter / iPython Notebook. I'm trying to use the high level pygal library.
Claude COULOMBE
  • 3,434
  • 2
  • 36
  • 39
1
vote
0 answers

How to add a custom CSS file to Pygal graphs?

I'm working with Pygal, and want to be able to add a custom css file to my Pygal graph. I've looked at the official documentation, and the find it confusing. Official doc on…
MichaelRSF
  • 886
  • 5
  • 16
  • 40
1
vote
1 answer

Can't get last few countries to show their population on pygal world map

I am working through python crash course and plotting populations on the pygal world map. Some country codes have to retrieved specifically because their country name is not standard. I started to trying to get this non-standard country codes…
1
vote
1 answer

How to change color of drawn points on pyGal line chart

I am creating a line graph using pygal by passing in an array of numbers to be graphed. I am wishing for the points marked on the graph to change color when they are in/outside of a certain range. I.e. If there is a point logged over 40, color it…
user7884989
1
vote
1 answer

"Import Error lxml" is shown in AWS Lambda

I am trying to run using pygal libray to show graph in AWS lambda.But this error is shown, even I have already installed lxml.deployment_package my_source_code import_error
Aye Nyein
  • 117
  • 2
  • 9
1
vote
1 answer

How to render in Latex pygal labels

I have some 2d data points that come with labels that I would like to render in pygal. For example say that for each point I need to visualise a feature when I over on it with the mouse. First of all, to plot the points without any labels, I did…
1
vote
0 answers

Unable to get pygal charts on pdf generated from html rendered via pygal

I am generating graph based reports and using Pygal library for it. I am able to get the graphs on html page but when I convert it into a pdf using wkhtml2pdf I am not able to get any graph. I am rendering and putting the rendered charts in a list…
sky
  • 260
  • 3
  • 12
1
vote
1 answer

Pygal bar chart says “No data”

I am trying to create a bar graph in pygal that uses the api for hacker news and charts the most active news based on comments. I posted my code below, but I cannot figure out why my graph keep saying "No data"??? Any suggestions? Thanks! import…
Daxialuo
  • 13
  • 2
1
vote
0 answers

How to know number of bars beforehand in Pygal?

When plotting a bar graph, for example, using pygal, I'd like to be able to know the number of bars the graph will have, in order to make a decision on whether or not the graph should be plotted. Is there a way to do this? Additionally, is there…
pepecarval
  • 11
  • 2