Recent

Author Topic: GrepHeatStyle  (Read 436 times)

0 Members and 1 Guest are viewing this topic.

Offline Diddler

  • Sr. Member
  • ****
  • Posts: 483
  • Gender: Male
  • But it looks ‘FINE’ on my screen
GrepHeatStyle
« on: January 03, 2019, 03:01:47 AM »
At Wits end and wanting advice on how to fix. (easily please).

So I've just spent the last 5+ months working on a massive project. I mean massive as this is a Heatmap designed to show us visually where things happen in our State. I have drawn the map in Illy and imported and linked to Layers and Variable Data so i can view by Name/Postcode (zip)/ distribution areas yada yada yada. see attachments.

All was going great until they now I've been informed the client wants a recap of the last few months which pushes the numbers past my range of 1% to 100% of a colour. You will see by looking at the numbers represented in the Heatmap (Let's call them beers consumed for that area) that it works perfectly except for once it goes above 100. If above 100 it only displays the first two digits for the colour %. (circled in yellow). The GrepHeatStyle script will only allow for 100 (I believe).

Looking for advice on how to display the numbers above 100 in total to be a different colour or background pattern?
I know I could change them manually but there are 420+ area variables so far and I nowhere near finished.

Any advice from you scripting pros will be greatly appreciated.

Cheers  :drunk3:





You can’t polish a Turd, but you can roll it in glitter!

Offline Joe

  • Master of Nothing
  • Administrator
  • Ninja Warlord
  • *****
  • Posts: 36519
  • Gender: Male
    • B4Print.com
Re: GrepHeatStyle
« Reply #1 on: January 03, 2019, 10:26:33 AM »
Yeah I think it can only do 100, ie...1% to 100%. Can your values display in a percentage instead of number of beers. For example if the max number of beers is 200 than one beer would be .5 (%), 2 beers would display as 1 (%) and 200 beers would display as 100 (%). Probably not a good solution but it is all I've got.
Mac OS 10.14.3 Mojave | Prinergy 8.2 | Adobe Creative Cloud 2019 | Two Luscher XPose 160 CTP units

Prepress: One who does precision guess work based on unreliable data provided by those of questionable knowledge.

Offline Tracy

  • Ninja Master
  • **
  • Posts: 7600
  • Gender: Female
Re: GrepHeatStyle
« Reply #2 on: January 03, 2019, 10:54:56 AM »
wow! wish I knew how to help, that looks fascinating.
I think DCurry knows about GREPS
You can't get those to a random color obviously to select similar and recolor

Offline DCurry

  • Ninja Member
  • *
  • Posts: 1804
  • Gender: Male
  • The jerk store called, and they're out of you.
Re: GrepHeatStyle
« Reply #3 on: January 03, 2019, 11:34:38 AM »
Thanks for the props, Tracy, but I really know very little about GREPs. I've used them a couple times to format some price tags.

The only idea I can think of to do this is instead of using the numbers to create a screened percentage, could you instead create individual color swatches and name the swatch the number? For instance, you would have a color called 1, another called 2, etc. For the swatches 1-100 you would make it its corresponding screen percentage, then when it goes over 100 you'd have to figure out a different color and make it whatever you want.

Of course, with 420 swatches that would mean lot of work, but I think you might be in for a lot of work no matter how you slice it.

Also, I have no clue how you'd implement my idea, but you've gotten pretty far with the way you have it now so I suspect you can get there if you like the idea.
Prinergy 8.1.1.286 • Preps 8 (Not a fan) • SmartStream Designer

Build a man a fire, and he'll be warm for a night. But set a man on fire, and he'll be warm for the rest of his life!

Offline Slappy

  • Ninja Member
  • *
  • Posts: 4029
  • Gender: Male
  • Come On. Fhqwhgads.
Re: GrepHeatStyle
« Reply #4 on: January 03, 2019, 10:31:43 PM »
Might want to float it by the IndesignSecrets folks, there's a few GREP Wizards over there. I think that part of their Forum is open to non-subscribers too.

Wish I'd learned that aspect of InDy, just never seems to be enough time or brain power left in a day.
A little diddie ‘bout black 'n cyan...two reflective colors doin’ the best they can.

Offline swampymarsh

  • Full Member
  • ***
  • Posts: 154
Re: GrepHeatStyle
« Reply #5 on: January 06, 2019, 07:59:28 AM »
I know some regex/grep – however this sounds more like an Illustrator script?

Hard to comment without knowing more of the technical details.

Offline Diddler

  • Sr. Member
  • ****
  • Posts: 483
  • Gender: Male
  • But it looks ‘FINE’ on my screen
Re: GrepHeatStyle
« Reply #6 on: January 07, 2019, 01:41:28 AM »
Cheers for the input guys n gals. I eventually just went back and modified the GREP script (100 times) so it now sees the colours in groups of 2%.

I will eventually re-modify the script later this week so I have ranges of 5%. So in theory I can go to 500.


Time for a  :drunk3:
« Last Edit: January 07, 2019, 02:36:47 AM by Diddler »
You can’t polish a Turd, but you can roll it in glitter!

Offline Tracy

  • Ninja Master
  • **
  • Posts: 7600
  • Gender: Female
Re: GrepHeatStyle
« Reply #7 on: January 07, 2019, 12:24:30 PM »
Good job Diddler!

Offline Kermy812

  • New Member
  • *
  • Posts: 38
Re: GrepHeatStyle
« Reply #8 on: January 22, 2019, 02:03:08 PM »
Just a thought, could you just constrain you data in another column to be proportional to a range on 1 to 100? I had to do something similar once and someone else had similar problem mrexel.com.
https://www.mrexcel.com/forum/excel-questions/748864-convert-series-numbers-1-5-scale-relative-highest-lowest-2.html

I think this would be for a range of 1 to 100:
=IF(A1="","",CEILING((A1-MIN(A:A)+1)/((MAX(A:A)-MIN(A:A)+2)/100),1))
it would look at column "A" for the largest value to set as 100, then set all values proportional to it.