debugging title issue, 2d plot tick, camera position 3d #358
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The link to the issue: #350
Part 1: The title error occurring throughout was due to two reasons.
These two issues have been addressed by assigning 'title' to 'obj.layout.title'. The top margin has been manually kept at 100.
Title issue is solved for 2d and 3d plots.
Part 2: Another issue was with 'ticks'.
The problem was tickmode was 'auto' and they weren't taking input from the Matlab plot.
This is addressed by making tickmode as 'array' and using 'tickvals'.
But, unfortunately, the same corrections didn't correct the ticks in the 3d plot. They remained 'auto' even after making direct changes in 'HTML file. So, the issue could be with the plotly.plot (plotly.newPlot). I found the same issue being discussed on StackExchange: https://stackoverflow.com/questions/37689268/is-it-possible-to-manually-set-the-scale-and-ticks-on-a-plot-ly-3d-scatter-graph
The HTML file with direct changes is attached below: Directly inserting 'tickvals' had no effect on 3d ticks.
Part 3: Camera position for 3d
For defining the position of the initial position of the 3d plot, all the 'layout' variables should come within 'scene' as shown in the HTML file attached .ie., 'obj. layout' should become 'obj.scene.layout'. But, doing that hampered the 2d plots, therefore I have not implemented them in code. Therefore, I have attached the HTML file that can rotate according to requirements. Currently, it will show the top view.
Since, I cannot attach an HTML file, I am attaching it as text. please change .txt to .html.
3dcameracorrection.txt