Assign different color on point from CSV files


(Nntsrb) #1

I have a csv file which contain a list of data
For example.
name, x pos, y pos
objectA, 50, 50
objectB, 55, 55
objectC, 60, 60
objectD, 70, 70

And I need to use the x, y pos data from that file to map it on grid like structure on the viewport for the futher use. I had managed to map it as I needed by directly applied x and y pos on construct point, and control their colors and sizes by dot display

However, I couldn’t figure how to assign different color on each dot base on its “name” data, and I came up with the idea to use the name length as an input for RGB data for each items.I’d managed to convert the name data into list of int using its name length , but still had no idea how to use that data to make it work


(Laurent Delrieu) #2

Use \fbox{Create Set} mesure the length \fbox{List Length} of the list generate some random point/colors using for example \fbox{Populate 3d} \fbox{Gradient} \fbox{Color Wheel}
Edit with HTML instead of Latex
Use Create Set mesure the length List Length of the list generate some random point/colors using for example Populate 3d Gradient Color Wheel

Post an example if you want some demonstration.


(David Rutten) #3

Woo \LaTeX!

ps. I use the <kbd> and </kbd> html tags to marks components in discourse, but that’s not a rule or anything.


(Laurent Delrieu) #4

Thanks David, I always found Latex beautiful and never use it. I rediscover it at my job with a beautiful software for Mind Mapping Freeplane which has Latex embedded

https://www.freeplane.org/wiki/index.php/Home


(David Rutten) #5

I’ve been using it since (apart from Google Docs) it’s the only type-setting software I have now. It’s simultaneously the most awesome and most horrific platform I’ve ever seen. I can fully appreciate why someone would hate having to use it.


(Laurent Delrieu) #6

Well, at the moment I prefer Grasshopper/Rhino, not very fluent with words, text, resume, report …

So I come back to color on text.
@nntsrb here is a screen copy of text colored depending on the word. I am kind enough to give you a good resolution :yum: here The song Hurt by Johnny Cash as an example.


(Nntsrb) #7

Wow that’s more complex than I’ve thought :joy: @laurent_delrieu Thank you


(Laurent Delrieu) #8

See just the lower part. Jitter is not mandatory.
Upper part is for text position.


#9

This is a truly accurate statement. Editor and compiler choice goes a long way though (using TexStudio with the XeLatex compiler myself).


(David Rutten) #10

I’ve always gotten build errors with XeLaTeX for some reason. But vanilla \LaTeX works fine for me, both for short documents (recipes and letters), medium documents (papers, documentation) and long ones (that book I started six years ago and is taking forever).