Ginger
A Nim package similar to R's Grid package
Install / Use
/learn @Vindaar/GingerREADME
- Ginger - a Grid like package in Nim
Ginger is a graphics package similar to R's [[https://www.rdocumentation.org/packages/grid/versions/3.6.0][Grid package]], which can be formed as a basis for a graphing library. It will be the foundation of [[https://github.com/Vindaar/ggplotnim][ggplotnim]] a "port" of ggplot2 for Nim.
The basic idea is to provide basic primitives to draw on a canvas, while providing layering capabilities via =Viewports= and good handling of different coordinate systems.
The backend of this package currently uses =cairo=, but as long as a backend can provide a few primitives like =drawLine=, =drawPoint= and a few others, a new backend can be added quickly. Thanks to using =cairo=, we can easily output to =png=, =svg= and =pdf= among others.
NOTE: Still under heavy development!
** Test examples
The following examples are not supposed to be pretty, but rather display different aspects of the library. They are basically just the images constructed. The images below are saved as png so they can be embedded in this README.
*** Setting axes
[[file:media/axisCheck.png]]
*** Axes and a background
[[file:media/debugAxes.png]]
*** Embed view into bottom right corner, rotate text
[[file:media/testEmbed.png]]
*** Test ggplot2 like colors
[[file:media/testGGCols.png]]
*** Testing nesting of axes
[[file:media/testNestedAxes.png]]
*** Constructing a whole "plot"
[[file:media/testView.png]]
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
