Skip to content

Latest commit

 

History

History
312 lines (238 loc) · 7.64 KB

Examples.md

File metadata and controls

312 lines (238 loc) · 7.64 KB

PSWordCloud Examples

Below are some sample output images, along with as many of their input commands as I can recall. Some of these may be from slightly different versions of the module, but by and large they should represent fairly accurately the results you can obtain with a little exploration.

Note that some of these are rendered on transparent backgrounds and may not look the best on lighter backdrops.

v2.x.x Examples

New Rotation Modes Tests

The below examples use the following command to generate the cloud, only adding the -AllowRotation mode for that test:

$poem | New-WordCloud -Path .\test.svg -ImageSize 800 -Typeface "Segoe Print" -FocusWord Hollow

$poem contains the poem text from this page.

-AllowRotation None

None

-AllowRotation Vertical

Vertical

-AllowRotation FlippedVertical

FlippedVertical

-AllowRotation EitherVertical (Default)

EitherVertical

-AllowRotation UprightDiagonals

UprightDiagonals

-AllowRotation InvertedDiagonals

InvertedDiagonals

-AllowRotation AllDiagonals

AllDiagonals

-AllowRotation AllUpright

AllUpright

-AllowRotation AllInverted

AllInverted

-AllowRotation All

All

v1.x.x Examples

These examples come from the v1.x.x versions of PSWordCloud.

Edge of Night

Input is the complete Lyrics from Edge of Night, the song Pipping sings in Lord of the Rings to the Steward of Gondor.

Edge of Night

$Params = @{
    Path            = '.\EdgeOfNight.png'
    FocusWord       = 'Edge of Night'
    StrokeWidth     = 2
    StrokeColor     = 'MidnightBlue'
    FontFamily      = 'Hobbiton Brushhand'
    ImageSize       = 4096
    BackgroundColor = 'Transparent'
    Padding         = 5
}
$Lyrics | New-WordCloud @Params

Paterson

These are a collection I created for a friend of my wife and I. Here's to William Carlos Williams' Paterson, just for you, Kate!

Cursive

Paterson Cursive

This one was very standard settings, apart from the font, which I don't recall.

Scriptina

Paterson Scriptina Blue

$Params = @{
    Path            = '.\Paterson.png'
    FocusWord       = 'Paterson'
    StrokeWidth     = 1
    StrokeColor     = 'Blue'
    FontFamily      = 'Scriptina'
    ImageSize       = 4096
    BackgroundColor = 'Transparent'
}
$Paterson | New-WordCloud @Params

Paterson Scriptina Deep Blue

$Params = @{
    Path            = '.\Paterson.png'
    FocusWord       = 'Paterson'
    StrokeWidth     = 1
    StrokeColor     = 'MidnightBlue'
    FontFamily      = 'Scriptina'
    ImageSize       = 4096
    BackgroundColor = 'Transparent'
}
$Paterson | New-WordCloud @Params

Paterson Scriptina Brown

$Params = @{
    Path            = '.\Paterson.png'
    FocusWord       = 'Paterson'
    StrokeWidth     = 1
    StrokeColor     = 'Brown'
    FontFamily      = 'Scriptina'
    ImageSize       = 4096
    BackgroundColor = 'Transparent'
}
$Paterson | New-WordCloud @Params

Paterson Scriptina Alt

$Params = @{
    Path            = '.\Paterson.png'
    FocusWord       = 'Paterson'
    StrokeWidth     = 1
    StrokeColor     = 'MidnightBlue'
    ColorSet        = '*light*'
    FontFamily      = 'Scriptina'
    ImageSize       = 4096
    BackgroundColor = 'Transparent'
}
$Paterson | New-WordCloud @Params

PSKoans

These are all created from the text and script data in the PSKoans module. Some include the test files, but most do not.

PSKoans HBH

$Params = @{
    Path            = '.\PSKoans.png'
    FocusWord       = 'PSKoans'
    FontFamily      = 'Hobbiton Brushhand'
    ColorSet        = '*light*'
    ImageSize       = 4096
    BackgroundColor = 'Transparent'
}
$PSKoans | New-WordCloud @Params

PSKoans HBH

$Params = @{
    Path            = '.\PSKoans.png'
    FontFamily      = 'Nerwus'
    StrokeWidth     = 1
    StrokeColor     = 'Brown'
    BackgroundColor = 'Transparent'
}
$PSKoans | New-WordCloud @Params

PSKoans Pretty

$Params = @{
    Path            = '.\PSKoans.png'
    FontFamily      = 'Scriptina'
    ImageSize       = 4096
    StrokeWidth     = 1
    StrokeColor     = 'Brown'
    BackgroundColor = 'Transparent'
}
$PSKoans | New-WordCloud @Params

PSKoans Zombie

$Params = @{
    Path            = '.\PSKoans.png'
    FontFamily      = 'Zombie Holocaust'
    ImageSize       = 4096
    StrokeWidth     = 1
    StrokeColor     = 'Brown'
    BackgroundColor = 'Transparent'
}
$PSKoans | New-WordCloud @Params

PSKoans Wingdings

$Params = @{
    Path            = '.\PSKoans-Wingdings.png'
    ImageSize       = 4096
    FontFamily      = 'Wingdings'
    BackgroundColor = 'Transparent'
}
$PSKoans | New-WordCloud @Params

PowerShell

These were created using every line of code from every .cs file in the PowerShell Core GitHub repository.

This was so slow I was literally forced to apply multithreading to the module to make it complete just the text processing portion in under an hour on my machine. It's much quicker now, but these were each an ordeal.

PowerShell

$Params = @{
    Path            = '.\PowerShell.png'
    FocusWord       = 'PowerShell'
    StrokeWidth     = 1
    StrokeColor     = 'MidnightBlue'
    ImageSize       = 4096
    BackgroundColor = 'Transparent'
    Padding         = 2
    MaxUniqueWords  = 250
    ExcludeWord     = Get-Content -Path .\ListofCommonCSharpKeywords.txt
}
$PSCoreCode | New-WordCloud @Params

PowerShell

$Params = @{
    Path            = '.\PowerShell.png'
    FocusWord       = 'PowerShell'
    StrokeWidth     = 1
    StrokeColor     = 'MidnightBlue'
    ColorSet        = '*light*', '*blue*', '*purple*'
    ImageSize       = 4096
    BackgroundColor = 'Transparent'
    Padding         = 2
}
$PSCoreCode | New-WordCloud @Params

PowerShell

$Params = @{
    Path            = '.\PowerShell.png'
    MaxUniqueWords  = 350
    Padding         = 2
}
$PSCoreCode | New-WordCloud @Params

PowerShell

$Params = @{
    Path            = '.\PowerShell.png'
    MaxUniqueWords  = 0
    Padding         = 0
    StrokeWidth     = 1
    StrokeColor     = 'MidnightBlue'
    ColorSet        = '*blue*','*purple*'
    BackgroundColor = 'White'
}
$PSCoreCode | New-WordCloud @Params

PowerShell-RFC Repo

This one is made from all the PowerShell-RFC Markdown files.

PowerShell-RFC

$Params = @{
    Path            = '.\PowerShell-RFC.png'
    Padding         = 3
    StrokeWidth     = 1
    StrokeColor     = 'MidnightBlue'
    ColorSet        = '*blue*','*purple*'
    BackgroundColor = 'White'
    FocusWord       = 'RFC'
}
$PSRFCMarkdown | New-WordCloud @Params