[Matplotlib] Ploting an exponential distribution frequency curve
Denis McMahon
denismfmcmahon at gmail.com
Sun Apr 26 14:55:27 EDT 2015
On Sat, 25 Apr 2015 23:33:10 +0100, Mario Figueiredo wrote:
> plot(list(results.keys()), list(results.values()))
I found multiple plots in matplotlib. You need to specify which one
you're using.
The first thing you need to do is create a small self contained example
of your problem.
State the problem: Plot does not create the output you expect.
Give an example:
plot( [1,11], [5,5] )
Explain what you expect the output to be:
You expect a line to be plotted from (1,5) to (11,5)
Explain what you actually see: ???
Note that it may be possible to correlate the data values and the output
of the simple case in a way that shows you that you have in some way
fundamentally misunderstood how the arguments should be passed to the
plot function. If this is the case, work out what you need to do to fix
the simple case, and then apply the same solution to your more complex
data set.
If, for example, you see a line from (1,11) to (5,5) instead of a line
from (1,5) to (11,5), then it might be that you need to combine the two
lists into a single list of co-ordinate tuples, using eg:
plot(zip(list(results.keys()), list(results.values())))
--
Denis McMahon, denismfmcmahon at gmail.com
More information about the Python-list
mailing list