Closed codydirks closed 7 years ago
Agreed that setting the range in the preview piece isn't working correctly. However, students can change the axes within the 'charts' tab itself. See attached image for where this happens.
I think we wait till winter true Intro2Astro effort to fix this. For now, we could include instructions to the students (in-class and on the assignments) that points out that we know it's a bug but that they can set axes within the 'charts' tab.
@codydirks is this like what you're seeing once sent over to the spreadsheet?
@srallen Yes that's identical to what I get.
Ok, I'll see if there've been any changes to the available APIs from Google and if it'd be a quick fix, but I doubt I'll be able to change anything about this until I have guaranteed time to work on it. In the meantime, the students should be directed to edit the ranges using the edit button on the chart itself once it is inserted into the chart.
I've been looking over this today and now I remember some details about it:
The Visualization API gives two kinds of options for setting the min and max for the range:
hAxis.minValue
and hAxis.maxValue
as well as vAxis.minValue
and vAxis.maxValue
. However, these options have the following caveat (quote from hAxis.maxValue
, but true for all):
Moves the max value of the horizontal axis to the specified value; this will be rightward in most charts. Ignored if this is set to a value smaller than the maximum x-value of the data. hAxis.viewWindow.max overrides this property.
In the above example, the actual data range is greater than the min or max value set in the option, so it will be ignored. As noted, it can overridden using viewWindow.max
or viewWindow.min
, but this doesn't actually set the range min and max, but rather just changes the view window and causes an odd looking plot:
Since the Google API ignores min and max values if they are less than what is in the data range, then I might suggest we remove the range option from the scatterplot helper entirely and have that be a manual step taught to the students. I can't fix it unless Google decides to change their API.
We've decided to remove the range options since I cannot fix it in the way that users will expect it to function.
The range options are removed in the latest version.
The "specified range" tool does not seem to be working correctly for the y-axis. When I try to plot entries in a specific RA and DEC region (for example, I did an x-axis of RA between 190 and 210, and a y-axis of DEC between -40 and 40), the resulting plot has the incorrect y-axis limits. I tried flipping the x and y axis and got similar incorrect results.
Additionally, the preview plot that is drawn does not seem to reflect the specified ranges.