cattanimarco / grafici-gfx Goto Github PK
View Code? Open in Web Editor NEWData visualization library for Arduino driven displays
License: Apache License 2.0
Data visualization library for Arduino driven displays
License: Apache License 2.0
change even background between skyline and background?
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?
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
Maybe you could add some explaining comments to the examples or the wiki ? That would be great !
Many thanks in davance !
line marker could serve to produce field
rotation could come from opt
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));
At the moment channels c and opt in the spline dataset are replicating channel y.
This change should enable spline on channels c and opt where possible and use linear interpolation otherwise
draw squares circle and triangle with multiple sections of straight lines
This way we can stretch them
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
If a start point and a stop point have different colors, the line color should result blended
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.