How to make scale reverse in spotfire parallel coordinates plot? - spotfire

I've a parallel coordinate plot in spotfire. I want to reverse the scale where 0% will be on top & 100% will be in down.
See this img -
I've gone through their documentation but didn't get any such option or example to do that. Can we do this?

Related

Gnuplotting CPU Load and %CPU

I have awk-extracted top -b output into a file giving lines like
16:23:36 2.58 190.9 7.0
(time, load, %CPU, %MEM)
Is there an easy way to plot load and cpu (and mem) into one diagram so that both y values are spread over the whole vertical diagram range?
This solution suggests scaling the data, but is it possible to have the scaling of the y ranges automatically done?
Please include your plot command so we can help you better.
Look into using both y-axis. Add axis x1y1 to one of your data items in the plot command and add axis x1y2 to the other.
Each y-axis will now self scale to fit the data unless you issued a yrange command.

different background colours histogram

I am wondering if anyone could provide a simple working example of a histogram that has different background colours for different values of "x". Something that would look like the following graph:
I cannot seem to find an easy way to do this, even though it is a fairly common visual tool when using histograms in a time context.
Please study https://stackoverflow.com/help/mcve for future questions. Here in the question we see no data example, no attempt at code, no provenance for your graph.
This is reproducible:
webuse grunfeld, clear
line invest year if company == 1
twoway scatteri 0 1939 1500 1939 1500 1945 0 1945, recast(area) color(gs12) || line invest year if company == 1 , ytitle(invest) legend(order(1 "WW II") pos(11))
Steps:
Draw a line plot and decide what to highlight. It's a rectangle and you need the coordinates of the corners.
It's crucial to draw the rectangle first, as otherwise it will overwrite your line plot. Tastes and imperatives vary, but a light gray often works well.
The rectangle is drawn by specifying an "immediate" scatteri plot of the coordinates of the corners, but recasting to an area plot.
You need to reach in and fix the vertical axis title and very possibly the legend. Fine tuning: use the Graph Editor.
Optionally use plotregion(margin(zero)) to remove the default area between the axes and the plotregion.

Is there an equivalent of soft pen in GDI+?

I need to draw a soft wide outline for my GDI+ GraphicsPath.
Something like this:
A path edge is shown in red. I'd like to use a wide pen which is smooth. I also need an ability to control smoothness of the pen.
I tried to use a gradient brush with the pen but couldn't find a solution that works.
I can achieve the desired result by drawing an outline with a black solid pen and applying a Gaussian smoothing filter on top of the result image, but I want to avoid this because it's slow when I have to process the whole image which could be quite large.
Is there a way to draw a smooth path outline?
There is no standard way in GDI+ that provides this functionality so you will have to create it.
You could track the line segments and draw a fuzzy, filled circle along the segments. By drawling the fuzzy circle once to a bitmap it should be fairly easy and fast to blit it continuously. By blending it slowly over time to the canvas you can also create a very nice effect and it would allow the user to control the intensity and maybe the size of the circle.

Scipy Guassian_kde Nomalisation

I've been using scipy.stats.gausian_kde but have a few questions about its output. I've plotted the normalised histogram and the gaussian_kde plot on the same graph. Why are the y-values so vastly different? My understanding is that the gaussian_kde plot should touch the tips of the histograms, roughly. Using the scipy.integrate.quad functions I determined the area under the graph to be 0.7, rather than 1.0, which is what I expected.
Actually what I really want is for the gaussian_kde to represent the non-normalised histogram, does anyone know how can I do that?
Your expectations are a little off. The area under each of the KDE's peaks should roughly equal the area in their corresponding bars. That appears to hold, to my eye. Nonadaptive KDEs with a global bandwidth estimate (like scipy.stats.gaussian_kde) tend to broaden multimodal distributions with sharp peaks.
As for the underestimate of the total area under the KDE, I cannot say without the data and the code that you used to do the integration.
In order to make a KDE approximate an unnormalized histogram, you need to multiply by (bin_width*N) where N is the total number of data points.

Radial stack issue

I'm trying to draw a radial chart (radar chart) using the Stack layout and Nest (as advised by mbostock). Code is here: http://bl.ocks.org/3017677 Purpose is to draw stacked areas along three axes of metrics (axis 1, 2 and 3). Areas map to min, average and max values along those metrics. Max area encompasses the average area which encompasses the min one.
The computations seem really fine until the path data string is built. That is, when entering for the layers, d.values looks OK while area(d.values) returns a somewhat correct motions sequence but microscopic values (e-14).
Didn't understand what I'm doing wrong yet :)
Issue was with the angle scale's domain. WIP at http://bl.ocks.org/3017677 for the curious minds.

Resources