Giter Club home page Giter Club logo

grafici-gfx's People

Contributors

cattanimarco avatar marcat03 avatar per1234 avatar weshouman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

grafici-gfx's Issues

Usage on e-Paper Displays (with GxEPD2)

I am trying to use your library with GxEPD2 as GFX driver.
Unfortunately, all I am getting is a white/gray screen, no graphs are drawn, nor anything else. Once your class is instantiated and the GFX object is passed to the constructor, all other text that had been on the display before, also disappears. In this case I am not sure if I understand the window parameter properly, eg. if I even should be able to supply my own text next to the graph or not, because I never got it working once.

Do you think you might be able to find out where the issue lies in this case?

More explanation on how to configure plots ?

Hi Marco,
the examples are pretty impressive ! I read and tried them all, also looked at the wiki and the source code.
The examples are a bit complex and some comments about which parameter does what would be great !
But still, I can't figure out simple things like

  • setting boundaries (i.e. if one only wants to use a part of the display for the diagram
  • how to adjust the rotation of the diagram to the screen rotation
  • how to make visible X/Y-axes with names and numbers
  • how to make bar graphs horizontally / vertically and how to set the colors
  • how to scale the axes
  • in dataset.begin(dataArray, 1 ,5), dataArry contains the data, 5 is for 5 elemets, but what is the "1" doing ?

Maybe you could add some explaining comments to the examples or the wiki ? That would be great !
Many thanks in davance !

Library is not compiling

The library is not compiling due to narrowing errors

PATH/Grafici-GFX/src/Boundary.h: In member function 'virtual CartesianVector<float> PolarBoundary::project(CartesianVector<float>) const':
PATH/Grafici-GFX/src/Boundary.h:222:49: error: narrowing conversion of '(((double)((const PolarBoundary*)this)->PolarBoundary::<anonymous>.Boundary::_x.Range<T>::mid<float>()) + (((double)((((const PolarBoundary*)this)->PolarBoundary::<anonymous>.Boundary::_x.Range<T>::delta<float>() * 5.0e-1f) * radius)) * cos((((double)(angle * 2.0e+0)) * 3.1415926535897931e+0))))' from 'double' to 'float' inside { } [-Werror=narrowing]
   return CartesianVector<DisplayNorm>{ _x.mid() + (radius * (_x.delta() / 2)) * cos(angle * 2 * M_PI),
                                                 ^
PATH/Grafici-GFX/src/Boundary.h:223:46: error: narrowing conversion of '(((double)((const PolarBoundary*)this)->PolarBoundary::<anonymous>.Boundary::_y.Range<T>::mid<float>()) + (((double)((((const PolarBoundary*)this)->PolarBoundary::<anonymous>.Boundary::_y.Range<T>::delta<float>() * 5.0e-1f) * radius)) * sin((((double)(angle * 2.0e+0)) * 3.1415926535897931e+0))))' from 'double' to 'float' inside { } [-Werror=narrowing]
                                     _y.mid() + (radius * (_y.delta() / 2)) * sin(angle * 2 * M_PI) };
                                              ^
In file included from PATH/Grafici-GFX/src/Grafici.h:35:0,
                 from /home/walid/org/projects/development/02_internal/arduino/projects/room_logger_epaper/room_logger_epaper.ino:67:
PATH/Grafici-GFX/src/Plotter/Bubblemap.h: In member function 'virtual void Plotter::Bubblemap::draw_block(const Display&, const Boundary&, const ColorMap&, Range<float>, Range<float>, DataNorm) const':
PATH/Grafici-GFX/src/Plotter/Bubblemap.h:19:98: error: narrowing conversion of '(((double)(x.Range<T>::delta<float>() * c)) * 5.0e-1)' from 'double' to 'float' inside { } [-Werror=narrowing]
   display.fillCircle(boundary.project({ x.mid(), y.mid() }), boundary.projectAbs({ c * x.delta() / 2.0, c * y.delta() / 2.0 }), colorMap.project(c));
                                                                                                  ^
PATH/Grafici-GFX/src/Plotter/Bubblemap.h:19:119: error: narrowing conversion of '(((double)(y.Range<T>::delta<float>() * c)) * 5.0e-1)' from 'double' to 'float' inside { } [-Werror=narrowing]
   display.fillCircle(boundary.project({ x.mid(), y.mid() }), boundary.projectAbs({ c * x.delta() / 2.0, c * y.delta() / 2.0 }), colorMap.project(c));

Properly namespace all methods

As soon as I include the library in my separate Screen class, I get a bunch of errors due to "multiple definition" of several plot functions:

/homefolder/Arduino/libraries/Grafici-GFX/src/plotter/PlotAxis.h:46: multiple definition of `plot_axis(DisplayDriver const&, Window const&, PlotAxisOpts)'; /tmp/arduino_build_317995/sketch/Screen.cpp.o:/homefolder/Arduino/libraries/Grafici-GFX/src/plotter/PlotAxis.h:46: first defined here
/homefolder/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /tmp/arduino_build_317995/sketch/myproject.ino.cpp.o: in function `plot_bar(DisplayDriver const&, Window const&, ColorMap const&, DataSourceNorm const&, DataSourceNorm const&, DataSourceNorm const&, PlotBarOpts)':
/homefolder/Arduino/libraries/Grafici-GFX/src/plotter/PlotBar.h:49: multiple definition of `plot_bar(DisplayDriver const&, Window const&, ColorMap const&, DataSourceNorm const&, DataSourceNorm const&, DataSourceNorm const&, PlotBarOpts)'; /tmp/arduino_build_317995/sketch/Screen.cpp.o:/homefolder/Arduino/libraries/Grafici-GFX/src/plotter/PlotBar.h:49: first defined here
/homefolder/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /tmp/arduino_build_317995/sketch/myproject.ino.cpp.o: in function `plot_line(DisplayDriver const&, Window const&, ColorMap const&, DataSourceNorm const&, DataSourceNorm const&, DataSourceNorm const&, PlotLineOpts)':
/homefolder/Arduino/libraries/Grafici-GFX/src/plotter/PlotLine.h:42: multiple definition of `plot_line(DisplayDriver const&, Window const&, ColorMap const&, DataSourceNorm const&, DataSourceNorm const&, DataSourceNorm const&, PlotLineOpts)'; /tmp/arduino_build_317995/sketch/Screen.cpp.o:/homefolder/Arduino/libraries/Grafici-GFX/src/plotter/PlotLine.h:42: first defined here
/homefolder/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /tmp/arduino_build_317995/sketch/myproject.ino.cpp.o: in function `plot_scatter(DisplayDriver const&, Window const&, ColorMap const&, DataSourceNorm const&, DataSourceNorm const&, DataSourceNorm const&, DataSourceNorm const&, PlotScatterOpts)':
/homefolder/Arduino/libraries/Grafici-GFX/src/plotter/PlotScatter.h:38: multiple definition of `plot_scatter(DisplayDriver const&, Window const&, ColorMap const&, DataSourceNorm const&, DataSourceNorm const&, DataSourceNorm const&, DataSourceNorm const&, PlotScatterOpts)'; /tmp/arduino_build_317995/sketch/Screen.cpp.o:/homefolder/Arduino/libraries/Grafici-GFX/src/plotter/PlotScatter.h:38: first defined here

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.