# Printing zero elements in lines of a sparse matrix

**URL:** <https://discourse.julialang.org/t/printing-zero-elements-in-lines-of-a-sparse-matrix/94530>\
**Category:** General Usage\
**Created:** [February 12, 2023, 8:13pm UTC](https://discourse.julialang.org/t/printing-zero-elements-in-lines-of-a-sparse-matrix/94530 "2023-02-12T20:13:20Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [February 12, 2023, 9:15pm UTC](https://discourse.julialang.org/t/printing-zero-elements-in-lines-of-a-sparse-matrix/94530/4 "2023-02-12T21:15:46Z")

</div>

See [pretty-printing in Julia](https://docs.julialang.org/en/v1/manual/types/#man-custom-pretty-printing) — `println` uses `show(io, x)`, but the REPL display uses `show(io, "text/plain", x)`. So do e.g.

```julia
show(stdout, "text/plain", Kuusc[45,:])

```

PS. Please [use quoted text](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757), _not_ screenshots.

---

_[View the full topic](https://discourse.julialang.org/t/printing-zero-elements-in-lines-of-a-sparse-matrix/94530)._
