Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

plotting dots at scatter chart

Hi all,

In my current working file i am trying to place the value in at a particular degree location.

If i select value in a field i.e; AngleTabPos=90.0812334 , then in scatter chart in needs to plot that dot at 90degrees from centre 0.

Please the attached file.

How can i work on this ? And please can you help on this.

Thanks in advance.

24 Replies
johnw
Champion III
Champion III

ravikumar_ajzaas wrote:

Before the image is in Anti-Clockwise Angles, but now i am trying to work in Clockwise Angles. What should i change in expression for clockwise Angles.

Nothing.  You don't change anything for clockwise angles.  The sin() and cos() functions should work just fine on negative angles.  Unless you mean that your data will have an angle of 60 degrees when what it really means is an angle of -60 degrees.  But in that case, just flip the sign.

Not applicable
Author

Hi John,

Why i removed the post is , i thought  to clarify the first task i.e; plotting the dots in clockwise,

After completion of this i thought to ask it later.

Now what i needs to change in the below expression for clockwise

x=    RadialPos*cos(pi()*AngleTabPos/180)

y=    RadialPos*sin(pi()*AngleTabPos/180)

Please see the attached file in previous post, so in that its having an new image how the angles should plot.

Thanks in advance.

Not applicable
Author

John i didn't get you clearly in your previous mail,

What i am trying to achieve is

if i click AngleTabPos= 359.9502608980, then its value dot should plot at near to 360 degree shown in new image. In the same way for all the values in AngleTabPos.

I hope you got what i am trying .

Thanks in advance.

swuehl
MVP
MVP

Just exchange the definitions for x and y?

johnw
Champion III
Champion III

Ah, sorry.  My screen is only 1028 wide, and your new image was off my screen, and I didn't even think to scroll over and look. 

If you look at the chart, you may notice that you can get the real angle by subtracting this new angle from 90 degrees:

0 -> 90
90 -> 0
180 -> -90
270 -> -180

RadialPos*cos(pi()*(90-AngleTabPos)/180) as X,
RadialPos*sin(pi()*(90-AngleTabPos)/180) as Y,

But there's a better approach.  You may also notice that to get the new results from the old results, you merely need to exchange X and Y:

0 -> (1,0) -> (0,1)
90 -> (0,1) -> (1,0)
180 -> (-1,0) -> (0,-1)
270 -> (0,-1) -> (-1,0)

RadialPos*cos(pi()*AngleTabPos/180) as Y,
RadialPos*sin(pi()*AngleTabPos/180) as X,

Edit: Stefan beat me to it.  I blame people coming into my office and asking me QlikView questions in person.  I should have hit "post" real fast before answering. 

Not applicable
Author

Thanks John and Swuehl.

For Overlapped dots should have different color, why it is bcoz the user can have an idea while looking the image itself he knows that there are some overlapped dots in around 1 pixel distance.

And the data in current appliaction will contain large amount of data.

If had a question,

if we are having a large data whether it is better to show in Transperency way or making the dots bigger which are grouping around 1 pixel distance.

you mentioned last point in your previous post that is

It's looking for clusters of at least five.  For clusters of two, just change the 5 to 2 in the script and in the third chart expression of the chart that appears when you press the button.  You'll also want a smaller cluster radius for your data (it's using 2.5, hidden as 6.25, the square of 2.5).  If you want it to be a pixel, then figure out what a pixel corresponds to ?

Now how can i set that overlapping dots with in 1 pixel in my application same as like what you sent application.

Thanks in advance.


johnw
Champion III
Champion III

If you're trying to highlight overlapped dots, I recommend just using transparency.  Make single dots visible, but as light as is otherwise practical.  This won't work well, though, if you expect to have a lot of dots in the same pixel, and then huge blank areas in the chart.  I think I know how to handle that, though, if that's what you expect.  Let me know, and I can work up an example.  Basically, though, you would assign discrete pixels values for X and Y, assign pair IDs to pairs of X,Y values, plot the pair IDs, and set your Z value to the count of records.

Not applicable
Author

hi John,

Yes,In same pixel i may have lot of dots.

Please can you provide the example of this in  which i attached recently qvw file.

Thanks in advance.

johnw
Champion III
Champion III

It doesn't work as well as I'd hoped, as QlikView wants to control the bubble sizes itself, and all I can specify is the relative sizes.  I "solved" this once in a trivial example by using a reference bubble larger than the others, displaying it in white, and putting it behind the rest.  That then fixed the size for the others, and I could then give them exact sizes.  I'm not seeing a clean way to apply that here yet given the realities of multiple dimensions and the ability to make selections.  I also can't keep working on this - this looks like a small project instead of a quick question, and I have my own work I need to get back to.

Anyway, I carefully sized the chart so that each sub chart is 200 pixels by 200 pixels between -1 and 1.  That means that each pixel is 0.01.  So we just round off X and Y to 0.01.  Give it a Coordinate field combining X and Y, plot coordinates, count(MK).  That's the gist of it.  The color expression is now hiding in the first chart expression.

Maybe it'll be useful as a starting point.  But if this is your real data, I'd probably still just handle it with transparency, perhaps like the second tab.  Use very light values to see the tiny clusters of multiple defects in a single pixel.  Use darker values to see bigger problematic areas.  You could use a drop down instead of a slider - that's what I did for one of my real applications.

Edit:  Also, if you can have lots of dots in a single pixel, and it's important to see that density, you may want to use a larger chart size.  This might work as an overview, but if you really want the details of these defects, I'd have a tab where almost the whole page is a single scatter chart of your defects.  Make them pick a specific mold if that's important.

Not applicable
Author

Thank you John for sharing the knowledge with me. And this will be helpful to me.

How you provided the Red Color for grouping dots ? Where i can  change the color instead of Red to Green.

Thanks