How to update data changes in an already drawn SPSS graph - charts

I have drawn several bar chart, scatter, and line graphs in SPSS 21 and spent lots of time on editing their look. But, I realized that I made some mistakes in data and they are already changed. In Microsoft excel, graphs are interactive/dynamic, meaning that they change if you modify the values of each cell. Can we mimic the same feature in SPSS 21? Is there any way I can update graphs without redrawing them from the scratch? I have saved them as output, but when I load them no change is reflected and the graphs are associated with old data.
I have saved syntaxes to produce the graphs, but when I run the syntax, the graphs are produced in standard looking that need lots of changes to look good. When I save chart templates and apply them to new charts, they don't look the same meaning that some of the changes are not applied.
Please help.

It is not possible. I feel you with making all the changes and the inconsistency in applying chart templates though. A few tips to mitigate this in the future are;
Do everything you can with GGRAPH and inline GPL statements to get the look of the chart close to how you want it.
Start with a chart template that is closer to your typical end goals. (See here on how to make some simple edits to the default template).
Some things are still difficult to fully automate like label placement in the chart. These simple tips though get me very close to the end goal, and only rarely do I need to take the time to polish a chart with editing post-hoc.

Related

Does ag-grid charting support line interpolation options or stepped lines?

A web app I am working on uses ag-grid to render detailed status data in a grid. Customer wants to chart a comparison between planned and actual status values, which I was able to do quickly and easily with ag-grid's charting capabilities. However, after a review the customer is interested in displaying the line as stepped between points rather than linear since each point is a target and data between targets is not interpolated in the details. I assumed that line interpolation was a fairly standard (and common) option for rendering line charts and would be supported. However, I cannot seem to find an option which allows me to set the line interpolation or stepping.
Am I just missing an option or is line interpolation and stepping just not supported for ag-grid line charts? If it is not supported, can this be done through some kind of customization, or am I stuck either adding points to my line to make it kind-of-sort-of look like a stepped line or pulling in a whole other charting library for what seems like a basic function?

FusionCharts/FusionTime stepline chart leaves off data points and binning aggregation distorts the data

I'm trying to reproduce a Pillow app timeline chart using FusionTime. Pillow tracks sleep quality and the different sleep stages using Apple Watch. The following is an example chart:
example Pillow chart
From the app you can export a json file with the data points. For example:
"sleepStageDataPoints": [
{
"stage": 1,
"timeStamp": 673239278.32947648
},
`Stage legend: 0=Deep, 1=Light, 2=REM, 3=Awake
I import the data into mysql, converting the Unix time in the process. I also increment the stage number so that Deep=1, etc., because the axis would be 0 in FusionTime.
So there is a start time and the level of the stage at that time, which remains the level until the next timestamp data point where the stage would change, etc.
Besides this metric, there will be other health related metrics I plan to capture that will model the data in a similar way. Only the starting time and the level at that time, which should remain the same until the next data point.
So that's the general plan. Now the problems...
I'm having trouble figuring out the best way. I think stepline would be the best chart type for this source data. I'm not expecting to be able to have the different stages have different colors. Just being able to see the height differences is sufficient.
But FusionTime doesn't show all of the data points and the ones it does show don't seem to be accurate. I'm blaming data binning.
FusionTime chart
As you can see the first point charted is on May 3rd, 12:24-12:26. But there are 5 data points from May 2nd that it just leaves off. I don't know why. And as you can see from comparing the two charts, the patterns don't match. For instance at 1am the Fusion chart says the level would be REM (3), but if you look at the Pillow chart, it would have to be either Deep (1) or Light (2). Looking at the data points in the database confirms that.
So it has to be the data binning aggregation that is changing the chart. I've tried every aggregation other than average and none of them makes a difference.
I'd like for the data to be 100% time accurate. I want to see every datapoint and not have the first ones disappear. If I mouse over 1am I should see the correct stage level for that time. As I zoom in or out, I'd like the columns to get more wide/narrow as appropriate, but the height should never be wrong. If I zoom too far out, I'd rather the data disappear than be wrong. I'd be fine to lock the zoom level if necessary, not that I know how to.
Is this possible with FusionCharts/FusionTime? Would there be a better chart type to accomplish what I'm trying to do? Is there a different charting software that would do this? I want to use FusionTime, because I want to have the multivariate charts to compare multiple metrics along the same timeline. And I do want to be able to zoom in and out because other metrics I'm tracking wouldn't be limited to this time frame. So I need to be able to zoom/scroll through the entire day.

Simulink - how to configure the appearance of a scope

I'm working on generating some figures for a paper from a simulink model, and would prefer to use minimal work to produce them so I'm trying to configure a simulink scope to output the figures I want on its own. The problem is, while I can get colors and such all arranged well, I can't seem to figure out how to modify the spacing between the graphs in a scope showing multiple signals. What I have now looks like the below:
Notice how the two plots have different vertical scales (probably a consequence of having the time scale only on the bottom one), and that there's a large gap of unused space between the plots. This is a concern when trying to publish in a journal, since page space is at a premium and we need to make the information as dense as possible.
So, how can I tweak these margins and formatting? I've tried looking at all the settings I can find, but none seem to affect these parameters.

Google Charts trendline y-intercept

I've been trying to force a trendline through 0,0 for my scatter graph, but I can't seem to find a way to do this.
From the docs here, they don't give any information on it: https://developers.google.com/chart/interactive/docs/gallery/trendlines
But, I know there are lots of undocumented stuff in charts.
This is an example of what i am trying to do within Google charts(Done within excel)
The red dotted liner is the trendline, on the left is the default liniear regression that Google charts can give, but in many situations you would want to force a Y-intercept, in this example its forced to be at 0
No, you should NOT need values to force an intercept. This is a pretty standard option in graphing programs. Unfortunately, I don't see where Google Sheets gives you the option, which is one reason I don't recommend it for serious data analysis.
It's odd that the LINEST function allows you to force a zero Y-Intercept, but the trend-line tool in the Chart Editor does not. Excel offers a checkbox to force the line through the origin. (Of course, one should exercise caution when doing so. You really have to know something about the data your analyzing.)

D3.js pie chart labels for slices not tweening

When I click on the various hyperlinks to tween my chart: while the pie's slices are tweening but I cannot figure out how to bring along each slice's label.
A mostly working JSfiddle is here: http://jsfiddle.net/lukateake/MX7JC/
Thanks in advance for any insights you can provide me. I promise to update the fiddle with whatever solution we discover as I imagine this effect is of interest to a great many D3'ers.
The main issue here is in your updateChart function - while you rebound the data to arcs, you did not do so for sliceLabel: (second line added)
arcs.data(donut(data.pct)); // recompute angles, rebind data
sliceLabel.data(donut(data.pct));
One other small thing - your slice label text selection seems a little bit strange:
var sliceLabel = label_group.selectAll("text.value")
but you are creating no text with class = "value"; this doesn't really end up affecting much, but might cause problems in other implementations - selectAll("text") or selectAll("text.arcLabel") might be more appropriate here.
updated fiddle at http://jsfiddle.net/MX7JC/9/