Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugging title issue, 2d plot tick, camera position 3d #358

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chetu700
Copy link

@chetu700 chetu700 commented Aug 25, 2021

The link to the issue: #350

Part 1: The title error occurring throughout was due to two reasons.

  1. title wasn't taken as input.
  2. even if we put the title, it was getting out of the window since, the margin was zero.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant