Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Python Histogram / Line Chart Issues

Hello All,

I have been using Plotly for a few months but mainly the JS version, and am now running into some problems trying to generate some graphs with the Python API.

I have a text file generated from a Java application which gives me:
value, count
value, count

I want to make a line graph using these values, simple enough right? Read the file, put all "value"s in x array, and counts in y array. However when I do this I get a jumbled mess of lines! The Y axis is not sorted and the lines are jumping all over the place.

I can also use Histogram but I figured that would take longer for huge text files I will have.

Ultimately I want a sorted X axis (values) and their respective counts. I am having trouble achieving this simple task so any help would be greatly appreciated.

Here is an example of my jumbled line graph:

Thanks in advance!