-1

Though the question may seem strange, sometimes it really can be useful. For example, I have to build a histogram using plt.hist, but I am not going to plot it, only to send the heights of the bars to the front-end side for actual plotting, and since the back-end side is run on an Ubuntu Server instance, I cannot install matplotlib via pip. Is it possible in general? Are there any other options in my particular case?

Gevorg Davoian
  • 484
  • 5
  • 13
  • Who do you mean you "cannot install matplotlib via pip" on Ubuntu Server? – Tay2510 Dec 20 '17 at 20:24
  • It seems pretty useless to use a plotting function like `hist` to calculate some values from the data. Just calculate the histogram and send it to the receipient without using matplotlib at all. – ImportanceOfBeingErnest Dec 20 '17 at 22:10
  • You can use X forwarding to run a GUI program on any compatible remote server, but that's nothing to do with python or matplotlib – OneCricketeer Dec 21 '17 at 01:08

1 Answers1

2

If you just want the histogram values, then just calculate them directly using something like numpy.histogram.

DilithiumMatrix
  • 17,795
  • 22
  • 77
  • 119