question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Media Panel: custom x-axis options

See original GitHub issue

Description

The step counter for custom plots doesn’t have other x-axis option except for step. And the Legend doesn’t work properly with custom plots. [The color doesn’t show up here.] Also, the title set up in matplotlib cuts off.

Screen Shot 2020-06-10 at 3 40 36 AM

Code Description

Reference code being used in pytorch-lighning’s LightningModule.

        fig, ax = plt.subplots()
        colors = {
            'train': 'blue',
            'valid': 'green',
            'test':  'red'}

        for split, yearwise_skills in skill_dict.items():
            years, skills = list(zip(*yearwise_skills))
            ax.scatter(years, skills, c=colors[split], label=split)

        ax.set_title(f'Epoch {self.current_epoch}')
        ax.set_ylabel(f'Skills at Epoch {self.current_epoch}')
        ax.set_xlabel('Years')
        ax.legend()
        ax.grid(True)

        self.logger.experiment.log({"Skill_by_years": plt})

Version info

* CUDA:
        - GPU:
                - GeForce RTX 2080 Ti
        - available:         True
        - version:           10.1
* Packages:
        - numpy:             1.18.1
        - pyTorch_debug:     False
        - pyTorch_version:   1.5.0
        - pytorch-lightning: 0.7.5
        - tensorboard:       2.2.0
        - tqdm:              4.45.0
        - wandb:            0.8.35
* System:
        - OS:                Linux
        - architecture:
                - 64bit
                -
        - processor:         x86_64
        - python:            3.6.10
        - version:           #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:21 (4 by maintainers)

github_iconTop GitHub Comments

21reactions
ai-alanovcommented, Feb 10, 2021

Please reopen the issue. The custom x-axis option is really needed. For example, I save images per epoch and the ability to change the x-axis from step to epoch would be great!

6reactions
elisimcommented, Apr 29, 2021

Hi, how to change the x-axis from step to epoch?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Media Panel: custom x-axis options · Issue #1093 - GitHub
The step counter for custom plots doesn't have other x-axis option except for step . And the Legend doesn't work properly with custom...
Read more >
Edit x-axis label of each panel plotted with facet_wrap
Try this approach, but you would have to isolate the labels in a dataframe and use geom_text() as we do not know how...
Read more >
Format Panel for Graph Visualizations - MicroStrategy
Select All Metrics to specify axis configuration options for all metrics in the visualization. This option is only available if the visualization displays ......
Read more >
How to Change the X-Axis Range in Excel Charts
To change the x-axis range, first determine the type of change you want to make. You can change category labels, label position and...
Read more >
Axes | Highcharts
Other options for grid lines can be found in the API reference for the x and y-axis. Minor grid lines are intermediary lines...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found