how to draw graph from dataset file in python by matplotlib?
It is not related with R? Can anyone help me how to draw graph from dataset file in python by matplotlib?
• 2,528 views
•
link
1 answer
It's massively not clear what you want to do, but plotting with matplotlib is as easy as passing 2 vectors of numbers.
# Generate some sample data
import random
x = random.sample(xrange(1,101), 100)
y = random.sample(xrange(1,101), 100)
# Make plot
import matplotlib.pyplot as plt
plot = plt.plot(x,y, "o")
plt.show()
Makes:

• 0 views
•
link
Log in to answer this question.
Why tag R then? You clearly state in the title that you want to draw a graph with python and matplotlib module.
What type of graph? What does your data look like? This is very limited information, and there are some pretty basic tutorials.
Simple graph, how will I open the file to plot a graph?
There are several ways. What type of format is your file? Post an example.
co2a0000364.rd
Please reformat with
101010button.sorry sir I'm not getting I have to open simple file and plot a graph
This is not a bioinformatics question, and likely will be closed by a moderator. You're probably best off, asking your question on StackOverflow.
Agree, although I would recommend adding A LOT of information to this question before asking it anywhere else.
Hello Ssonia!
We believe that this post does not fit the main topic of this site.
Not related to bioinformatics and question really unclear
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!