The question I have as the title says is on the idea of setting up a graph in pygame that graphs sub-pixel coordinates. 
Something a friend and I spoke of was how I could try to make a function graphing program for fun in python, and I thought about how I could use it, but I found a few issues. 
The first one was the use of range, due to it using integers and not floats, but arange from numpy fixed that problem, but that brings me to the second issue. 
The idea for the graph I thought about so that it would be simple, not making massive thick lines or odd shaped one, is that it uses display.set_at to make a single pixel a color. And for simple graphs, this works perfectly. But when I went into more complicated graphs, I ran into two main errors: 

The first error is that the graph shows pixels without any line between them, the idea of the line was the illusion of having all of the pixels near each other. But I found that with a range step of one in range, it leaves this gap. In theory, using arange with a step of .01, the gaps would vanish all together, but this brings to the second problem.
The display.set_at does not work with sub-pixel coordinates. Would anyone be able to suggest a way to make this work? It would be most appreciated.
Instead of setting each individual pixel, use pygame's line drawing function to draw a line from the current coordinate to the next instead of using sub-pixel coordinates (pygame.draw.line or even pygame.draw.lines).
This way, the "gaps" between two points are filled; no need for sub-pixel coordinates.
You just have to draw the lines in the right order; just ensure the coordinates are sorted.

Other than that, you could also simple convert your sub-pixel coordinates by casting the x/y values to integers.
Pygame, sub-pixel coordinates.