Draw Table Update

john's Avatar

john

29 Aug, 2024 07:37 AM

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!

  1. Support Staff 1 Posted by john on 31 Aug, 2024 11:07 PM

    john's Avatar

    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.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • draw_table_screenshot 462 KB
  • draw_table_update.ndbx.zip 15.9 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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

Recent Discussions

01 Oct, 2024 07:59 AM
30 Sep, 2024 11:37 PM
30 Sep, 2024 11:11 AM
30 Sep, 2024 02:37 AM
28 Sep, 2024 10:33 AM

 

26 Sep, 2024 06:41 AM
24 Sep, 2024 12:32 AM
24 Sep, 2024 12:27 AM
13 Sep, 2024 12:07 AM
12 Sep, 2024 11:54 PM
07 Sep, 2024 05:16 AM