Giter Site home page Giter Site logo

Comments (6)

jrbrearley avatar jrbrearley commented on May 25, 2024

Sorry, uploaded the wrong .png, here is the correct one:
pygnuplot_ex

from pygnuplot.

PanderMusubi avatar PanderMusubi commented on May 25, 2024

I really like the package you have created. Not being able to store text data is a showstopper unfortunately for pie charts, histograms, etc. Could this be fixed, please? The error in Python 3 is:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/numpy/lib/npyio.py", line 1215, in savetxt
    fh.write(asbytes(format % tuple(row) + newline))
TypeError: must be real number, not numpy.str_

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "xxxxx.py", line xx, in <module>
    yyyyy()
  File "zzzzz.py", line zz, in yyyyy
    PyGnuplot.s([x, y])
  File "/usr/local/lib/python3.6/dist-packages/PyGnuplot.py", line 74, in s
    _savetxt(filename, _array(data), delimiter=', ')
  File "/usr/lib/python3/dist-packages/numpy/lib/npyio.py", line 1219, in savetxt
    % (str(X.dtype), format))
TypeError: Mismatch between array dtype ('<U22') and format specifier ('%.18e, %.18e')

from pygnuplot.

benschneider avatar benschneider commented on May 25, 2024

All thats needed is a way to save not just data but also text into the same file then.
Working on it.

from pygnuplot.

benschneider avatar benschneider commented on May 25, 2024

The problems mentioned should me solved now;
Delimiter was changed form , to space.
Data should be saved in a more sane way. (hopefully)
Data storage should allow for text entries now.
(Which in its course removed its dependence on numpy).

Hope this works, please test it.

from pygnuplot.

jrbrearley avatar jrbrearley commented on May 25, 2024

Thanks for the fix Ben. I can now put text labels in the data file and make a graph like this:
pygnuplot_ex

from pygnuplot.

PanderMusubi avatar PanderMusubi commented on May 25, 2024

Thanks!

from pygnuplot.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.