Draw Table Update
NOTE: I added a subsequent update to this update. See below for latest version.
I have added some improvements to my draw_table node:
- fixed bug that sometimes caused an error when displaying points
- now tolerates columns with mixed or unusual items
- now uses fit_true and scale_true for fidelity at all sizes
- added NEW render path option
Render path is particularly handy when debugging to spot incorrect paths in a table. You can also use it to produce quick and dirty presentation slides or whenever you need to show data in context or turn a small CSV into a PNG.
Screenshot and demo attached. Click the checkboxes to see what happens.
Enjoy!
- draw_table_screenshot 462 KB
- draw_table_update.ndbx.zip 15.9 KB
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by john on 31 Aug, 2024 11:07 PM
Update to my update!
I thought I was done with improvements to this node, but came up with one more...
The newest version of draw_table now supports styling on individual cells using my style_text node. You can highlight cells by italicizing them, bolding them, turning them red, or any combination of the three.
In order to do this you must first identify the cells you wish to highlight. This is done by two other nodes (supplied in the demo), hilite_string and hilite_numb; use the first for text, the second for numbers. Identify the column of the table and the value you wish to highlight. For text strings this must be an exact match. For numbers you can use a comparator (e.g. all numbers < 0). Then check any combination of the three checkboxes, Italic, Bold, and/or Red and feed the modified table data into your draw_table node. You can chain multiple hilite nodes together if you wish.
The attached demo shows two examples. In the first I turn the first three columns of the "Square" row bold and red to show that its area serves as a comparison for the rest. In the second, I show Payment items in bold italic, amounts <0 in red, and changes <0 in bold red. If you choose the "Align numbers" option in draw_table, highlighted numbers will align correctly.
One known issue. Because my style_text node uses asterisks (*) and tildes (~) to mark highlighted text, it may become confused by table cells containing those two characters. It shouldn't break, but it might hide those characters. This would take a lot of work to fix, and I thought it would be unlikely to cause much trouble in real life, so I left this in. If anyone uses this new feature and finds a real-world example requiring you to create drawable tables with highlighted cells containing asterisks or tildes, please reply to this thread and include your use case.
Screenshot and demo attached. As always I will be overjoyed to hear any feedback about these new features.