Git Product home page Git Product logo

stata-spider's Issues

allow non-string categories

If I am not mistaken, categories need to be formatted as strings. In my use case it would be better if a factor variable can be used because the order of the values has a meaning that should be preserved.

Example

Dear Asjad, again a really great graphic package to use for data visualization!

Note that the plot published as the Palette example:
spider index*, over(policy) ra(10 80) cuts(8) smooth(0.1) palette(CET C1) lw(0.4) ms(0.6) alpha(2)
on your main page is not correct. It should be like:

ExampleSpiderPalettesCET_CI

Allow for legend(off)

At the moment it is not possible to turn the legend off.
I suggest to redo the if "legend'" and add:
if "`legend'" == "off" {
local legend legend(off)
}

it is an attempt to create a raw spider plot - see #6

Option smooth not working

Dear Asjad,

First of all. Thank you so much for creating this package. I am constantly using spider plots but always found Stata's radar plot unattractive.

I am writing to you because I just tried your package for the first time and when I use the option Smooth I always get an error message saying "variable _m not found"

This only appears when running smooth.

Hope you can help ( :

Thanks in advance!

Add SLABColor

I would like to create spider plot with scheme neon. However the spike label color seems to be hard-coded to black and is therefore not visible.

Suggestion: add slabcolor option to be able to set spike label color.

Definition: SLABColor(string)
Under label section in ado: if "`slabcolor'" == "" local slabcolor "black"
And in line command: mlabcolor(`slabcolor')

I would really appreciate it!

option by() not allowed -- add checks to make sure `by()` has at least three categories.

https://www.statalist.org/forums/forum/general-stata-discussion/general/1752516-spider-stata-module-for-spider-plots-radar-plot

Dear Asjad Naqvi,

Currently I am trying to perform a Spider plot with the package spider, using Stata 18.

I was trying to follow up the tutorial that Asjad Naqvi kindly provide in GitHub:

GitHub - asjadnaqvi/stata-spider: spider: A Stata package for spider plots.

But unfortunately, the by() option is not allowed when I try to perform the code

Code:
spider Domain_score , over ( Domain_name ) by ( EQIndex_detoriation)
option by() not allowed
r(198);

Code:

  • Example generated by -dataex-. For more info, type help dataex
    clear
    input float subject_id byte Domain_score str1 Domain_moment_BorF byte EQIndex_detoriation str19 Domain_name
    6184 2 "b" 1 "Mobility"
    6184 1 "b" 1 "Selfcare"
    6184 2 "b" 1 "DailyActivities"
    6184 1 "b" 1 "PainDiscomfort"
    6184 1 "b" 1 "FearDepressed"
    6184 3 "f" 1 "Mobility"
    6184 1 "f" 1 "Selfcare"
    6184 4 "f" 1 "DailyActivities"
    6184 3 "f" 1 "PainDiscomfort"
    6184 2 "f" 1 "FearDepressed"
    5926 1 "b" 1 "Mobility"
    5926 1 "b" 1 "Selfcare"
    5926 1 "b" 1 "DailyActivities"
    5926 1 "b" 1 "PainDiscomfort"
    5926 1 "b" 1 "FearDepressed"
    5926 1 "f" 1 "Mobility"
    5926 2 "f" 1 "Selfcare"
    5926 2 "f" 1 "DailyActivities"
    5926 2 "f" 1 "PainDiscomfort"
    5926 1 "f" 1 "FearDepressed"
    5800 1 "b" 1 "Mobility"
    5800 1 "b" 1 "Selfcare"
    5800 2 "b" 1 "DailyActivities"
    5800 1 "b" 1 "PainDiscomfort"
    5800 2 "b" 1 "FearDepressed"
    5800 2 "f" 1 "Mobility"
    5800 2 "f" 1 "Selfcare"
    5800 3 "f" 1 "DailyActivities"
    5800 1 "f" 1 "PainDiscomfort"
    5800 1 "f" 1 "FearDepressed"
    5731 1 "b" 1 "Mobility"
    5731 1 "b" 1 "Selfcare"
    5731 1 "b" 1 "DailyActivities"
    5731 2 "b" 1 "PainDiscomfort"
    5731 2 "b" 1 "FearDepressed"
    5731 1 "f" 1 "Mobility"
    5731 3 "f" 1 "Selfcare"
    5731 4 "f" 1 "DailyActivities"
    5731 3 "f" 1 "PainDiscomfort"
    5731 4 "f" 1 "FearDepressed"
    5690 5 "b" 1 "Mobility"
    5690 5 "b" 1 "Selfcare"
    5690 1 "b" 1 "DailyActivities"
    5690 4 "b" 1 "PainDiscomfort"
    5690 2 "b" 1 "FearDepressed"
    5690 5 "f" 1 "Mobility"
    5690 5 "f" 1 "Selfcare"
    5690 3 "f" 1 "DailyActivities"
    5690 4 "f" 1 "PainDiscomfort"
    5690 1 "f" 1 "FearDepressed"
    5644 1 "b" 1 "Mobility"
    5644 1 "b" 1 "Selfcare"
    5644 1 "b" 1 "DailyActivities"
    5644 3 "b" 1 "PainDiscomfort"
    5644 2 "b" 1 "FearDepressed"
    5644 3 "f" 1 "Mobility"
    5644 1 "f" 1 "Selfcare"
    5644 3 "f" 1 "DailyActivities"
    5644 1 "f" 1 "PainDiscomfort"
    5644 2 "f" 1 "FearDepressed"
    5474 1 "b" 1 "Mobility"
    5474 1 "b" 1 "Selfcare"
    5474 1 "b" 1 "DailyActivities"
    5474 3 "b" 1 "PainDiscomfort"
    5474 1 "b" 1 "FearDepressed"
    5474 3 "f" 1 "Mobility"
    5474 1 "f" 1 "Selfcare"
    5474 3 "f" 1 "DailyActivities"
    5474 3 "f" 1 "PainDiscomfort"
    5474 2 "f" 1 "FearDepressed"
    5466 2 "b" 1 "Mobility"
    5466 2 "b" 1 "Selfcare"
    5466 1 "b" 1 "DailyActivities"
    5466 1 "b" 1 "PainDiscomfort"
    5466 1 "b" 1 "FearDepressed"
    5466 1 "f" 1 "Mobility"
    5466 1 "f" 1 "Selfcare"
    5466 2 "f" 1 "DailyActivities"
    5466 2 "f" 1 "PainDiscomfort"
    5466 1 "f" 1 "FearDepressed"
    5394 1 "b" 1 "Mobility"
    5394 1 "b" 1 "Selfcare"
    5394 1 "b" 1 "DailyActivities"
    5394 1 "b" 1 "PainDiscomfort"
    5394 1 "b" 1 "FearDepressed"
    5394 5 "f" 1 "Mobility"
    5394 1 "f" 1 "Selfcare"
    5394 5 "f" 1 "DailyActivities"
    5394 1 "f" 1 "PainDiscomfort"
    5394 1 "f" 1 "FearDepressed"
    5300 1 "b" 1 "Mobility"
    5300 1 "b" 1 "Selfcare"
    5300 1 "b" 1 "DailyActivities"
    5300 1 "b" 1 "PainDiscomfort"
    5300 1 "b" 1 "FearDepressed"
    5300 2 "f" 1 "Mobility"
    5300 1 "f" 1 "Selfcare"
    5300 2 "f" 1 "DailyActivities"
    5300 2 "f" 1 "PainDiscomfort"
    5300 1 "f" 1 "FearDepressed"
    end

I also have a second issue, and not sure how to solve it:
The labels in the radar are quite weird (1-2-2-2-2 instead of 0-1-2-3-4-5), and I can't edit them in the edition window

Thanks in advance for your help!

different x- und y-size

At the moment graph sizes and aspect ratio are fixed at 1. The legend is set at position 6.
In my use case, to present the graphs using Powerpoint, I would like to use the widescreen opportunity - thus x-size is 2,5x of the y-size.
I guess it is necessary that the spider graph plot region itself is quadratic - so the setting itself is necessary, or? But would there be an opportunity to place the legend at position 3, 4 or 5 to use the possible width of a presentation?

Editing legend labels

Is there currently a way to update the labels in the legend, to make them more readable than just the variable names, e.g. index_EU, index_NA, etc. from the example? I tried to use the legend(label()) option from twoway but it said it was not allowed. Thanks!

Keep over(cat var) order - add `order()` option

First: thanks for your effort!
It would be nice if the variables that define the cat var could be kept in the order of their appearance in the dataset, or some other ordering variable. At present the categories of the cat var get displayed in alphabetical order around the web. A workaround to add eg a numerical prefix as in 1-germany 2-france 3-england and so on works until you get to 10 - we all know the 1 10 11 12 2 3 4 5 thing ...
Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.