Wednesday, August 1, 2012

Re: How to print a graph

    it is an intranet, and I don't have any restrictions using JavaScript... abd I am using matplotlib... I thing it is the only way to save a file and put it on the web page...



On Wed, Aug 1, 2012 at 1:59 PM, william ratcliff <william.ratcliff@gmail.com> wrote:
What are you using for your plotting package?  Matplotlib?   I think that this will show the plot (on the server machine)--the easiest thing I can think of for now (assuming that you are using matplotlib) is to generate a pdf and send them the file.   I haven't tried printing directly--is this intranet, or external facing?  Do you have any restrictions on using javascript?

William


On Wed, Aug 1, 2012 at 12:58 PM, Peregil <peregilx@gmail.com> wrote:
a user to print one

I did this in python, but throws an error in django when I tried to run it... I have seen some examples of saving an image, but I would like to avoid that since I don't want to open and close a file...

let me know if you have any idea....

thanks

Python program:


def drawPlot(arrayGene1, arrayGene2):
    message = ''
    (m,b) = polyfit(arrayGene1,arrayGene2,1)
    yp    = polyval([m,b],arrayGene1)
    
    xlable('Gene 1')
    ylable('Gene 2')
    title('Correlation Graph')
    plot(arrayGene1, yp)
    scatter(arrayGene1,arrayGene2,marker='>')
    show()    
    return(message)



On Wed, Aug 1, 2012 at 12:21 PM, william ratcliff <william.ratcliff@gmail.com> wrote:
Do you need to display a graph, or allow the user to print one?  

On Wed, Aug 1, 2012 at 12:06 PM, Peregil <peregilx@gmail.com> wrote:
The information comes from a database, which I got it with a problem. However, I need to show a graph as well.

Please let me know any suggestions... 

thanks and have great day.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment